Add files via upload

This commit is contained in:
DaviStudios 2024-03-06 15:12:58 +02:00 committed by GitHub
parent 35100874b4
commit 9844929203
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 139 additions and 0 deletions

139
mods/advanced_colonies.js Normal file
View File

@ -0,0 +1,139 @@
elements.male_davler = {
color: "#afe7ed",
behavior: behaviors.CRAWLER,
category: "davlers",
state: "solid",
tempHigh: 125,
stateHigh: "dead_bug",
reactions: {
"sugar": { elem2: null },
"meat": { elem2: null },
"rotten_meat": { elem2: null },
"cooked_meat": { elem1: "davler_remains" },
"dough": { elem2: null },
"baking_soda": { elem1: "davler_remains" }
}
};
elements.female_davler = {
color: "#c1ecf1",
behavior: behaviors.CRAWLER,
category: "davlers",
state: "solid",
tempHigh: 125,
stateHigh: "dead_bug",
reactions: {
"sugar": { elem2: null },
"meat": { elem2: null },
"rotten_meat": { elem2: null },
"cooked_meat": { elem1: "davler_remains" },
"dough": { elem2: null },
"baking_soda": { elem1: "davler_remains" }
}
};
elements.davler_queen = {
color: "#3495eb",
behavior: behaviors.CRAWLER,
category: "davlers",
state: "solid",
tempHigh: 150,
stateHigh: "davler_remains",
properties: {
"eaten": 0
},
tick: function(pixel) {
if (pixel.eaten > 2) {
pixel.eaten = 0
createPixel('larvae', pixel.x + 1, pixel.y)
}
},
reactions: {
"sugar": { elem2: null, func: function(pixel){pixel.eaten = pixel.eaten +1} },
"meat": { elem2: null },
"rotten_meat": { elem2: null },
"cooked_meat": { elem1: "dead_bug" },
"dough": { elem2: null },
"baking_soda": { elem1: "dead_bug" }
}
};
elements.larvae = {
color: ["#f2e9c9", "#ebd798"],
behavior: behaviors.POWDER,
category: "davlers",
state: "solid",
tempHigh: 150,
stateHigh: "dead_bug",
properties: {
"hatch": 300,
"fertilized": false
},
tick: function(pixel) {
if (pixel.hatch < 1) {
const nX = pixel.x
const nY = pixel.y
deletePixel(pixel.x, pixel.y)
const chance = Math.floor(Math.random() * ( 2 - 1 + 1)) + 1
if (chance == 1) {
createPixel('female_davler', nX, nY)
} else {
createPixel('male_davler', nX, nY)
}
} else {
if (pixel.fertilized == true) {
pixel.hatch = pixel.hatch - 1
}
}
},
reactions: {
"baking_soda": { elem1: "dead_bug" },
"male_davler": { func: function(pixel){pixel.fertilized = true } }
}
};
elements.davler_remains = {
color: elements.dead_bug.color,
behavior: behaviors.POWDER,
state: "solid",
category: "davlers",
reactions: {
"yolk": { elem2: "artificial_larvae", elem1: null }
}
};
elements.artificial_larvae = {
color: ["#f2e9c9", "#ebd798"],
behavior: behaviors.POWDER,
category: "davlers",
state: "solid",
tempHigh: 150,
stateHigh: "dead_bug",
properties: {
"hatch": 450,
"fertilized": false
},
tick: function(pixel) {
if (pixel.hatch < 1) {
const nX = pixel.x
const nY = pixel.y
deletePixel(pixel.x, pixel.y)
const chance = Math.floor(Math.random() * ( 4 - 1 + 1)) + 1
if (chance == 1) {
createPixel('female_davler', nX, nY)
} else if ( chance == 2 ) {
createPixel('male_davler', nX, nY)
} else {
createPixel('dead_bug', nX, nY)
}
} else {
if (pixel.fertilized == true) {
pixel.hatch = pixel.hatch - 1
}
}
},
reactions: {
"baking_soda": { elem1: "dead_bug" },
"male_davler": { func: function(pixel){pixel.fertilized = true } }
}
};