From 560aa72f3fde60759de6345a82c5cd04b2bbea69 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Mon, 10 Feb 2025 14:46:34 -0500 Subject: [PATCH 01/34] sex with a cactus --- mods/a_mod_by_alice.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index fca8f545..4086ae75 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -5691,7 +5691,7 @@ color1 and color2 spread through striped paint like dye does with itself. col canvasLayersPostRenderers = []; drawLayers = function(includeBackground) { //console.log("dl tick"); - if (ctx === null) return + if (ctx === null || ctx === undefined) return clearLayers(); ctx.clearRect(0, 0, canvas.width, canvas.height); findColorPulseTimerSubTimer++; @@ -44735,7 +44735,7 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa }; //NO GAMMA RAY SPAWNERS OR FILLERS IN RANDOM ## runAfterLoad(function() { - randomBlacklist = ["quark_matter", "liquid_neutronium", "molten_neutronium", "neutronium", "neutronium_gas", "colored_fi ller", "copycat_filler", "insulating_filler"]; + randomBlacklist = ["quark_matter", "liquid_neutronium", "molten_neutronium", "neutronium", "neutronium_gas", "colored_filler", "copycat_filler", "insulating_filler"]; for(i = 0; i < randomBlacklist.length; i++) { var element = randomBlacklist[i]; if(elements[element]) { elements[element].excludeRandom = true }; @@ -45678,7 +45678,7 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa //END ## console.log("Mod loaded"); - logMessage("a_mod_by_alice.js requires many other mods. Many of the elements and features added with it installed are actually added by the other mods it depends on.") + window.addEventListener("load",function() {logMessage("a_mod_by_alice.js requires many other mods. Many of the elements and features added with it installed are actually added by the other mods it depends on.")}) } catch (error) { alert(`Load failed (try reloading).\nThis is likely a sporadic failure caused by inconsistencies in how mods are loaded, and will likely fix itself in a refresh or two. If it persists, then it's an issue.\nError: ${error.stack}`); console.error(error) From 0a93f2155cb82472b8e0c3424ac1597730e85178 Mon Sep 17 00:00:00 2001 From: Nekonico <163950752+DBNekonico@users.noreply.github.com> Date: Mon, 10 Feb 2025 18:02:58 -0800 Subject: [PATCH 02/34] Correct body temp update --- mods/biology.js | 2340 +++++++++++++++++++++++++++++------------------ 1 file changed, 1454 insertions(+), 886 deletions(-) diff --git a/mods/biology.js b/mods/biology.js index 83ce49ca..646c1961 100644 --- a/mods/biology.js +++ b/mods/biology.js @@ -48,7 +48,7 @@ viewInfo[6] = { // Speed View viewInfo[7] = { // Illness View name: "ill", pixel: function(pixel,ctx) { - if ((elements[pixel.element].id === elements.poison.id || elements[pixel.element].id === elements.cyanide.id || elements[pixel.element].id === elements.infected_vessel.id || elements[pixel.element].id === elements.infection.id || elements[pixel.element].id === elements.cancer.id || elements[pixel.element].id === elements.plague.id || elements[pixel.element].id === elements.rotten_meat.id) || (elements[pixel.element].isBio === true && ((pixel.speed < -5 || pixel.oxygen < 250 || pixel.nutrition < 250) || pixel.poisoned === true)) || ((elements[pixel.element].id === elements.digested_material.id || elements[pixel.element].id === elements.gaseous_material.id) && ((pixel.speed < 0 || pixel.nutrition < 5) || pixel.poisoned === true) && (pixel.immune !== true || !pixel.immune))) { + if ((elements[pixel.element].id === elements.cyanide_gas.id || elements[pixel.element].id === elements.poison_gas.id || elements[pixel.element].id === elements.poison.id || elements[pixel.element].id === elements.cyanide.id || elements[pixel.element].id === elements.infected_vessel.id || elements[pixel.element].id === elements.infection.id || elements[pixel.element].id === elements.cancer.id || elements[pixel.element].id === elements.plague.id || elements[pixel.element].id === elements.rotten_meat.id) || (elements[pixel.element].isBio === true && ((pixel.speed < -5 || pixel.oxygen < 250 || pixel.nutrition < 250) || pixel.poisoned === true || pixel.sick === true || pixel.alcoholic === true)) || ((elements[pixel.element].id === elements.digested_material.id || elements[pixel.element].id === elements.gaseous_material.id) && ((pixel.speed < 0 || pixel.nutrition < 5) || pixel.poisoned === true) && (pixel.immune !== true || !pixel.immune))) { var a = (settings.textures !== 0) ? pixel.alpha : undefined; if (((elements[pixel.element].isGas && elements[pixel.element].glow !== false) || elements[pixel.element].glow || pixel.glow) && pixel.glow !== false) { drawPlus(ctx,pixel.color,pixel.x,pixel.y,undefined,a) @@ -76,6 +76,22 @@ renderPresets.FLESHBURN = function(pixel,ctx) { drawSquare(ctx,"#000000",pixel.x,pixel.y,undefined,Math.min(0.8,(ratio-0.5)*0.8)); }, +renderPresets.NERVE = function(pixel,ctx) { + drawDefault(ctx,pixel) + if (pixel.darkcharge === true) { + drawSquare(ctx,"#000000",pixel.x,pixel.y,undefined,Math.min(0.8,0.55)); + } + if (pixel.darkchargeCD === true) { + drawSquare(ctx,"#000000",pixel.x,pixel.y,undefined,Math.min(0.8,0.5)); + } + if (pixel.lightcharge === true) { + drawSquare(ctx,"#ffffff",pixel.x,pixel.y,undefined,Math.min(0.8,0.55)); + } + if (pixel.lightchargeCD === true) { + drawSquare(ctx,"#ffffff",pixel.x,pixel.y,undefined,Math.min(0.8,0.5)); + } +}, + behaviorRules.BCF = function() { if (btemp.pixel.clone) { if (isEmpty(btemp.newCoords.x, btemp.newCoords.y)) { @@ -138,7 +154,7 @@ behaviorRules.ADB = function() { if (btemp.arg != null) { var args = btemp.arg.split(","); } if (btemp.arg == null || args.indexOf(newPixel.element) !== -1) { if (!elements[newPixel.element].hardness || Math.random() > elements[newPixel.element].hardness) { - if (elements[newPixel.element].isFood === true) { + if (elements[newPixel.element].isFood === true && !elements[btemp.pixel.element].reactions[newPixel.element]) { changePixel(newPixel,"digested_material"); newPixel.nutrition = 10; if (pixelMap[btemp.pixel.x][btemp.pixel.y] != undefined) { @@ -147,7 +163,7 @@ behaviorRules.ADB = function() { btemp.deleted = true; btemp.swapSpots = []; } - else if (elements[newPixel.element].isFood != true) { + else if (elements[newPixel.element].isFood != true && !elements[btemp.pixel.element].reactions[newPixel.element]) { if (elements[newPixel.element].hardness < 0.9 || !elements[newPixel.element].hardness) { deletePixel(btemp.newCoords.x,btemp.newCoords.y); if (pixelMap[btemp.pixel.x][btemp.pixel.y] != undefined) { @@ -164,541 +180,8 @@ behaviorRules.ADB = function() { }, doBioNorm = function(pixel) { -if ((Math.random() > 0.92 && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.5 && pixel.poisoned === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.burning === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp > 53 && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp < -10 && pixel.nutrition > 0 && pixel.oxygen > 0) || Math.random() > 0.85 && Math.random() < (pixel.burnt / 100)) { - pixel.nutrition-- - pixel.oxygen -= 2 -} -if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1 || pixel.speed < -100)) { - if (elements[pixel.element].isMultiDie === true) { - if (pixel.temp > 95) { - if (Math.random() < 0.75) { - changePixel(pixel,elements[pixel.element].normDie); - } - else { - changePixel(pixel,elements[pixel.element].heatDie); - } - } - else if (pixel.temp < -15) { - if (Math.random() < 0.75) { - changePixel(pixel,elements[pixel.element].normDie); - } - else { - changePixel(pixel,elements[pixel.element].coldDie); - } - } - else { - if (Math.random() < 0.999) { - changePixel(pixel,elements[pixel.element].normDie); - } - else { - changePixel(pixel,elements[pixel.element].roomDie); - } - } - } - else if (elements[pixel.element].isMultiDie === false) { - if (Math.random() < 0.75) { - changePixel(pixel,elements[pixel.element].normDie); - } - else { - changePixel(pixel,elements[pixel.element].otherDie); - } - } -} -if (pixel.nutrition === null || isNaN(pixel.nutrition)) { - pixel.nutrition = 500 -} -if (pixel.oxygen === null || isNaN(pixel.oxygen)) { - pixel.oxygen = 500 -} -if (pixel.speed === null || isNaN(pixel.speed)) { - pixel.speed = 0 -} -if (pixel.immune === true && pixel.poisoned != false) { - pixel.poisoned = false -} -if ((pixel.temp > 124.55 || pixel.burning) && Math.random() > 0.5) { - if (!pixel.burnt) { pixel.burnt = 1 } - else { pixel.burnt ++ } -} -if (pixel.char != pixel.burnt && pixel.burnt > pixel.char || !pixel.char) { - pixel.char = pixel.burnt -} -if (!isEmpty(pixel.x, pixel.y-1, true)) { - var hitPixel = pixelMap[pixel.x][pixel.y-1] - if (elements[hitPixel.element].isBio === true) { - if (hitPixel.oxygen < pixel.oxygen) { - hitPixel.oxygen += (elements[pixel.element].oxygTrans) - pixel.oxygen -= (elements[pixel.element].oxygTrans) - } - if (hitPixel.nutrition < pixel.nutrition) { - hitPixel.nutrition += (elements[pixel.element].nutrTrans) - pixel.nutrition -= (elements[pixel.element].nutrTrans) - } - if (hitPixel.speed < pixel.speed) { - hitPixel.speed += 1 - pixel.speed -= 1 - } - if (hitPixel.oxygen > pixel.oxygen) { - hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) - pixel.oxygen += (elements[hitPixel.element].oxygTrans) - } - if (hitPixel.nutrition > pixel.nutrition) { - hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) - pixel.nutrition += (elements[hitPixel.element].nutrTrans) - } - if (hitPixel.speed > pixel.speed) { - hitPixel.speed -= 1 - pixel.speed += 1 - } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { - hitPixel.poisoned = true - } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { - hitPixel.poisoned = false - hitPixel.immune = true - } - if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burnt-- - } - if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burning = false - } - } - else if (hitPixel.burning && Math.random() > 0.9) { - if (!pixel.burnt) { pixel.burnt = 1 } - else { pixel.burnt ++ } - } -} -if (!isEmpty(pixel.x, pixel.y+1, true)) { - var hitPixel = pixelMap[pixel.x][pixel.y+1] - if (elements[hitPixel.element].isBio === true) { - if (hitPixel.oxygen < pixel.oxygen) { - hitPixel.oxygen += (elements[pixel.element].oxygTrans) - pixel.oxygen -= (elements[pixel.element].oxygTrans) - } - if (hitPixel.nutrition < pixel.nutrition) { - hitPixel.nutrition += (elements[pixel.element].nutrTrans) - pixel.nutrition -= (elements[pixel.element].nutrTrans) - } - if (hitPixel.speed < pixel.speed) { - hitPixel.speed += 1 - pixel.speed -= 1 - } - if (hitPixel.oxygen > pixel.oxygen) { - hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) - pixel.oxygen += (elements[hitPixel.element].oxygTrans) - } - if (hitPixel.nutrition > pixel.nutrition) { - hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) - pixel.nutrition += (elements[hitPixel.element].nutrTrans) - } - if (hitPixel.speed > pixel.speed) { - hitPixel.speed -= 1 - pixel.speed += 1 - } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { - hitPixel.poisoned = true - } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { - hitPixel.poisoned = false - hitPixel.immune = true - } - if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burnt-- - } - if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burning = false - } - } - else if (hitPixel.burning && Math.random() > 0.9) { - if (!pixel.burnt) { pixel.burnt = 1 } - else { pixel.burnt ++ } - } -} -if (!isEmpty(pixel.x-1, pixel.y, true)) { - var hitPixel = pixelMap[pixel.x-1][pixel.y] - if (elements[hitPixel.element].isBio === true) { - if (hitPixel.oxygen < pixel.oxygen) { - hitPixel.oxygen += (elements[pixel.element].oxygTrans) - pixel.oxygen -= (elements[pixel.element].oxygTrans) - } - if (hitPixel.nutrition < pixel.nutrition) { - hitPixel.nutrition += (elements[pixel.element].nutrTrans) - pixel.nutrition -= (elements[pixel.element].nutrTrans) - } - if (hitPixel.speed < pixel.speed) { - hitPixel.speed += 1 - pixel.speed -= 1 - } - if (hitPixel.oxygen > pixel.oxygen) { - hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) - pixel.oxygen += (elements[hitPixel.element].oxygTrans) - } - if (hitPixel.nutrition > pixel.nutrition) { - hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) - pixel.nutrition += (elements[hitPixel.element].nutrTrans) - } - if (hitPixel.speed > pixel.speed) { - hitPixel.speed -= 1 - pixel.speed += 1 - } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { - hitPixel.poisoned = true - } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { - hitPixel.poisoned = false - hitPixel.immune = true - } - if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burnt-- - } - if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burning = false - } - } - else if (hitPixel.burning && Math.random() > 0.9) { - if (!pixel.burnt) { pixel.burnt = 1 } - else { pixel.burnt ++ } - } -} -if (!isEmpty(pixel.x+1, pixel.y, true)) { - var hitPixel = pixelMap[pixel.x+1][pixel.y] - if (elements[hitPixel.element].isBio === true) { - if (hitPixel.oxygen < pixel.oxygen) { - hitPixel.oxygen += (elements[pixel.element].oxygTrans) - pixel.oxygen -= (elements[pixel.element].oxygTrans) - } - if (hitPixel.nutrition < pixel.nutrition) { - hitPixel.nutrition += (elements[pixel.element].nutrTrans) - pixel.nutrition -= (elements[pixel.element].nutrTrans) - } - if (hitPixel.speed < pixel.speed) { - hitPixel.speed += 1 - pixel.speed -= 1 - } - if (hitPixel.oxygen > pixel.oxygen) { - hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) - pixel.oxygen += (elements[hitPixel.element].oxygTrans) - } - if (hitPixel.nutrition > pixel.nutrition) { - hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) - pixel.nutrition += (elements[hitPixel.element].nutrTrans) - } - if (hitPixel.speed > pixel.speed) { - hitPixel.speed -= 1 - pixel.speed += 1 - } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { - hitPixel.poisoned = true - } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { - hitPixel.poisoned = false - hitPixel.immune = true - } - if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burnt-- - } - if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burning = false - } - } - else if (hitPixel.burning && Math.random() > 0.9) { - if (!pixel.burnt) { pixel.burnt = 1 } - else { pixel.burnt ++ } - } -} -} - -doBioBlood = function(pixel) { -if (Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050)) && Math.random() < 0.001) { - for (var i = 0; i < squareCoords.length; i++) { - var coords = squareCoords[i]; - var x = pixel.x + coords[0]; - var y = pixel.y + coords[1]; - if (isEmpty(x,y)) { - createPixel("flesh",x,y); - } - } -} -if ((Math.random() > (elements[pixel.element].ageRate) && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.5 && pixel.poisoned === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.burning === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp > 53 && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp < -10 && pixel.nutrition > 0 && pixel.oxygen > 0) || Math.random() > 0.85 && Math.random() < (pixel.burnt / 100) ) { - pixel.nutrition-- - pixel.oxygen -= 2 -} -if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1 || pixel.speed < -100)) { - if (pixel.immune === true) { - changePixel(pixel,"antibody"); - } - else if (pixel.poisoned === true) { - changePixel(pixel,"infection"); - } - else { - changePixel(pixel,elements[pixel.element].bleed); - } -} -if (pixel.nutrition === null || isNaN(pixel.nutrition)) { - pixel.nutrition = 500 -} -if (pixel.oxygen === null || isNaN(pixel.oxygen)) { - pixel.oxygen = 500 -} -if (pixel.speed === null || isNaN(pixel.speed)) { - pixel.speed = 0 -} -if (pixel.immune === true && pixel.poisoned != false) { - pixel.poisoned = false -} -if ((pixel.temp > 150 || pixel.burning) && Math.random() > 0.95) { - if (!pixel.burnt) { pixel.burnt = 1 } - else { pixel.burnt ++ } -} -if (pixel.char != pixel.burnt && pixel.burnt > pixel.char || !pixel.char) { - pixel.char = pixel.burnt -} -if (!isEmpty(pixel.x, pixel.y-1, true)) { - var hitPixel = pixelMap[pixel.x][pixel.y-1] - if (elements[hitPixel.element].isBio === true) { - if (hitPixel.oxygen < pixel.oxygen) { - if (pixel.heartAttached === true) { - hitPixel.oxygen += (elements[pixel.element].oxygTrans + 10) - pixel.oxygen -= (elements[pixel.element].oxygTrans + 9) - } - else { - hitPixel.oxygen += (elements[pixel.element].oxygTrans) - pixel.oxygen -= (elements[pixel.element].oxygTrans) - } - } - if (hitPixel.nutrition < pixel.nutrition) { - if (pixel.heartAttached === true) { - hitPixel.nutrition += (elements[pixel.element].nutrTrans + 10) - pixel.nutrition -= (elements[pixel.element].nutrTrans + 10) - } - else { - hitPixel.nutrition += (elements[pixel.element].nutrTrans) - pixel.nutrition -= (elements[pixel.element].nutrTrans) - } - } - if (hitPixel.speed < pixel.speed) { - hitPixel.speed += 1 - pixel.speed -= 1 - } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.75) { - hitPixel.poisoned = true - } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.5) { - hitPixel.poisoned = false - hitPixel.immune = true - } - if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burnt-- - } - if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burning = false - } - if (elements[hitPixel.element].isBlood === true && pixel.heartAttached === true && hitPixel.heartAttached === false && Math.random() > 0.5) { - hitPixel.heartAttached = true - } - } -} -else if (isEmpty(pixel.x, pixel.y-1) && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { - if (Math.random() > 0.95) { - if (pixel.immune === true) { - createPixel("antibody",pixel.x,pixel.y-1) - } - else if (pixel.poisoned === true) { - createPixel("infection",pixel.x,pixel.y-1) - } - else { - createPixel(elements[pixel.element].bleed,pixel.x,pixel.y-1) - } - } - pixel.oxygen -= 50 - pixel.nutrition -= 50 -} -if (!isEmpty(pixel.x, pixel.y+1, true)) { - var hitPixel = pixelMap[pixel.x][pixel.y+1] - if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) { - if (hitPixel.oxygen < pixel.oxygen) { - if (pixel.heartAttached === true) { - hitPixel.oxygen += (elements[pixel.element].oxygTrans + 10) - pixel.oxygen -= (elements[pixel.element].oxygTrans + 9) - } - else { - hitPixel.oxygen += (elements[pixel.element].oxygTrans) - pixel.oxygen -= (elements[pixel.element].oxygTrans) - } - } - if (hitPixel.nutrition < pixel.nutrition) { - if (pixel.heartAttached === true) { - hitPixel.nutrition += (elements[pixel.element].nutrTrans + 10) - pixel.nutrition -= (elements[pixel.element].nutrTrans + 10) - } - else { - hitPixel.nutrition += (elements[pixel.element].nutrTrans) - pixel.nutrition -= (elements[pixel.element].nutrTrans) - } - } - if (hitPixel.speed < pixel.speed) { - hitPixel.speed += 1 - pixel.speed -= 1 - } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.6) { - hitPixel.poisoned = true - } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.5) { - hitPixel.poisoned = false - hitPixel.immune = true - } - if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burnt-- - } - if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burning = false - } - if (elements[hitPixel.element].isBlood === true && pixel.heartAttached === true && hitPixel.heartAttached === false && Math.random() > 0.5) { - hitPixel.heartAttached = true - } - } -} -else if (isEmpty(pixel.x, pixel.y+1) && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { - if (Math.random() > 0.95) { - if (pixel.immune === true) { - createPixel("antibody",pixel.x,pixel.y+1) - } - else if (pixel.poisoned === true) { - createPixel("infection",pixel.x,pixel.y+1) - } - else { - createPixel(elements[pixel.element].bleed,pixel.x,pixel.y+1) - } - } - pixel.oxygen -= 50 - pixel.nutrition -= 50 -} -if (!isEmpty(pixel.x-1, pixel.y, true)) { - var hitPixel = pixelMap[pixel.x-1][pixel.y] - if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) { - if (hitPixel.oxygen < pixel.oxygen) { - if (pixel.heartAttached === true) { - hitPixel.oxygen += (elements[pixel.element].oxygTrans + 10) - pixel.oxygen -= (elements[pixel.element].oxygTrans + 9) - } - else { - hitPixel.oxygen += (elements[pixel.element].oxygTrans) - pixel.oxygen -= (elements[pixel.element].oxygTrans) - } - } - if (hitPixel.nutrition < pixel.nutrition) { - if (pixel.heartAttached === true) { - hitPixel.nutrition += (elements[pixel.element].nutrTrans + 10) - pixel.nutrition -= (elements[pixel.element].nutrTrans + 10) - } - else { - hitPixel.nutrition += (elements[pixel.element].nutrTrans) - pixel.nutrition -= (elements[pixel.element].nutrTrans) - } - } - if (hitPixel.speed < pixel.speed) { - hitPixel.speed += 1 - pixel.speed -= 1 - } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.75) { - hitPixel.poisoned = true - } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.5) { - hitPixel.poisoned = false - hitPixel.immune = true - } - if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burnt-- - } - if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burning = false - } - if (elements[hitPixel.element].isBlood === true && pixel.heartAttached === true && hitPixel.heartAttached === false && Math.random() > 0.5) { - hitPixel.heartAttached = true - } - } -} -else if (isEmpty(pixel.x-1, pixel.y) && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { - if (Math.random() > 0.95) { - if (pixel.immune === true) { - createPixel("antibody",pixel.x-1,pixel.y) - } - else if (pixel.poisoned === true) { - createPixel("infection",pixel.x-1,pixel.y) - } - else { - createPixel(elements[pixel.element].bleed,pixel.x-1,pixel.y) - } - } - pixel.oxygen -= 50 - pixel.nutrition -= 50 -} -if (!isEmpty(pixel.x+1, pixel.y, true)) { - var hitPixel = pixelMap[pixel.x+1][pixel.y] - if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) { - if (hitPixel.oxygen < pixel.oxygen) { - if (pixel.heartAttached === true) { - hitPixel.oxygen += (elements[pixel.element].oxygTrans + 10) - pixel.oxygen -= (elements[pixel.element].oxygTrans + 9) - } - else { - hitPixel.oxygen += (elements[pixel.element].oxygTrans) - pixel.oxygen -= (elements[pixel.element].oxygTrans) - } - } - if (hitPixel.nutrition < pixel.nutrition) { - if (pixel.heartAttached === true) { - hitPixel.nutrition += (elements[pixel.element].nutrTrans + 10) - pixel.nutrition -= (elements[pixel.element].nutrTrans + 10) - } - else { - hitPixel.nutrition += (elements[pixel.element].nutrTrans) - pixel.nutrition -= (elements[pixel.element].nutrTrans) - } - } - if (hitPixel.speed < pixel.speed) { - hitPixel.speed += 1 - pixel.speed -= 1 - } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.75) { - hitPixel.poisoned = true - } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.5) { - hitPixel.poisoned = false - hitPixel.immune = true - } - if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burnt-- - } - if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { - hitPixel.burning = false - } - if (elements[hitPixel.element].isBlood === true && pixel.heartAttached === true && hitPixel.heartAttached === false && Math.random() > 0.5) { - hitPixel.heartAttached = true - } - } -} -else if (isEmpty(pixel.x+1, pixel.y) && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { - if (Math.random() > 0.95) { - if (pixel.immune === true) { - createPixel("antibody",pixel.x+1,pixel.y) - } - else if (pixel.poisoned === true) { - createPixel("infection",pixel.x+1,pixel.y) - } - else { - createPixel(elements[pixel.element].bleed,pixel.x+1,pixel.y) - } - } - pixel.oxygen -= 50 - pixel.nutrition -= 50 -} -} - -doBioBone = function(pixel){ -if ((Math.random() > 0.995 && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.5 && pixel.poisoned === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.burning === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp > 55 && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp < -10 && pixel.nutrition > 0 && pixel.oxygen > 0) || Math.random() > 0.85 && Math.random() < (pixel.burnt / 100)) { - pixel.nutrition-- +if ((Math.random() > 0.92 && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() < (pixel.alcoDepri / 100) && pixel.alcoholic === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.60 && pixel.sick === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.5 && pixel.poisoned === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.burning === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp > 53 && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp < -10 && pixel.nutrition > 0 && pixel.oxygen > 0) || Math.random() > 0.85 && Math.random() < (pixel.burnt / 100)) { + pixel.nutrition -= 0.5 pixel.oxygen-- } if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1 || pixel.speed < -100)) { @@ -746,9 +229,738 @@ if (pixel.oxygen === null || isNaN(pixel.oxygen)) { if (pixel.speed === null || isNaN(pixel.speed)) { pixel.speed = 0 } -if (pixel.immune === true && pixel.poisoned != false) { +if ((pixel.alcoDepri || pixel.alcoDepri === 0) && pixel.alcoholic === true) { + pixel.alcoDepri += 1 +} +if (pixel.alcoTime < (pixelTicks - 10000) && pixel.alcoholic === true && Math.random() > 0.999 || pixel.alcoRecover === true) { + pixel.alcoDepri = undefined + pixel.alcoTime = undefined + pixel.alcoholic = false + pixel.alcoRecover = true +} +if (pixel.poisonImmune === true && pixel.poisoned != false) { pixel.poisoned = false } +if ((pixel.poisonImmune === true || pixel.immune === true) && pixel.sick != false) { + pixel.sick = false +} +if ((pixel.temp > 124.55 || pixel.burning) && Math.random() > 0.5) { + if (!pixel.burnt) { pixel.burnt = 1 } + else { pixel.burnt ++ } +} +if (pixel.char != pixel.burnt && pixel.burnt > pixel.char || !pixel.char) { + pixel.char = pixel.burnt +} +if (!isEmpty(pixel.x, pixel.y-1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y-1] + if (elements[hitPixel.element].isBio === true) { + if (hitPixel.oxygen < pixel.oxygen) { + hitPixel.oxygen += (elements[pixel.element].oxygTrans) + pixel.oxygen -= (elements[pixel.element].oxygTrans) + } + if (hitPixel.nutrition < pixel.nutrition) { + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) + } + if (hitPixel.speed < pixel.speed) { + hitPixel.speed += 1 + pixel.speed -= 1 + } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + hitPixel.poisoned = true + } + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { + hitPixel.immune = true + } + if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burnt-- + } + if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burning = false + } + } + else if (hitPixel.burning && Math.random() > 0.9) { + if (!pixel.burnt) { pixel.burnt = 1 } + else { pixel.burnt ++ } + } +} +if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + if (elements[hitPixel.element].isBio === true) { + if (hitPixel.oxygen < pixel.oxygen) { + hitPixel.oxygen += (elements[pixel.element].oxygTrans) + pixel.oxygen -= (elements[pixel.element].oxygTrans) + } + if (hitPixel.nutrition < pixel.nutrition) { + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) + } + if (hitPixel.speed < pixel.speed) { + hitPixel.speed += 1 + pixel.speed -= 1 + } + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + hitPixel.poisoned = true + } + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { + hitPixel.poisoned = false + hitPixel.immune = true + } + if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burnt-- + } + if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burning = false + } + } + else if (hitPixel.burning && Math.random() > 0.9) { + if (!pixel.burnt) { pixel.burnt = 1 } + else { pixel.burnt ++ } + } +} +if (!isEmpty(pixel.x-1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x-1][pixel.y] + if (elements[hitPixel.element].isBio === true) { + if (hitPixel.oxygen < pixel.oxygen) { + hitPixel.oxygen += (elements[pixel.element].oxygTrans) + pixel.oxygen -= (elements[pixel.element].oxygTrans) + } + if (hitPixel.nutrition < pixel.nutrition) { + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) + } + if (hitPixel.speed < pixel.speed) { + hitPixel.speed += 1 + pixel.speed -= 1 + } + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + hitPixel.poisoned = true + } + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { + hitPixel.poisoned = false + hitPixel.immune = true + } + if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burnt-- + } + if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burning = false + } + } + else if (hitPixel.burning && Math.random() > 0.9) { + if (!pixel.burnt) { pixel.burnt = 1 } + else { pixel.burnt ++ } + } +} +if (!isEmpty(pixel.x+1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x+1][pixel.y] + if (elements[hitPixel.element].isBio === true) { + if (hitPixel.oxygen < pixel.oxygen) { + hitPixel.oxygen += (elements[pixel.element].oxygTrans) + pixel.oxygen -= (elements[pixel.element].oxygTrans) + } + if (hitPixel.nutrition < pixel.nutrition) { + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) + } + if (hitPixel.speed < pixel.speed) { + hitPixel.speed += 1 + pixel.speed -= 1 + } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + hitPixel.poisoned = true + } + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { + hitPixel.poisoned = false + hitPixel.immune = true + } + if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burnt-- + } + if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burning = false + } + } + else if (hitPixel.burning && Math.random() > 0.9) { + if (!pixel.burnt) { pixel.burnt = 1 } + else { pixel.burnt ++ } + } +} +} + +doBioBlood = function(pixel) { +if (Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050)) && Math.random() < 0.001) { + for (var i = 0; i < squareCoords.length; i++) { + var coords = squareCoords[i]; + var x = pixel.x + coords[0]; + var y = pixel.y + coords[1]; + if (isEmpty(x,y)) { + createPixel("flesh",x,y); + } + } +} +if ((Math.random() > (elements[pixel.element].ageRate) && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() < (pixel.alcoDepri / 100) && pixel.alcoholic === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.60 && pixel.sick === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.5 && pixel.poisoned === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.burning === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp > 53 && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp < -10 && pixel.nutrition > 0 && pixel.oxygen > 0) || Math.random() > 0.85 && Math.random() < (pixel.burnt / 100) ) { + pixel.nutrition -= 0.5 + pixel.oxygen-- +} +if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1 || pixel.speed < -100)) { + if (pixel.poisoned === true || pixel.sick === true) { + changePixel(pixel,"infection") + } + else { + changePixel(pixel,elements[pixel.element].bleed); + } +} +if (pixel.nutrition === null || isNaN(pixel.nutrition)) { + pixel.nutrition = 500 +} +if (pixel.oxygen === null || isNaN(pixel.oxygen)) { + pixel.oxygen = 500 +} +if (pixel.speed === null || isNaN(pixel.speed)) { + pixel.speed = 0 +} +if ((pixel.alcoDepri || pixel.alcoDepri === 0) && pixel.alcoholic === true) { + pixel.alcoDepri += 1 +} +if (pixel.alcoTime < (pixelTicks - 10000) && pixel.alcoholic === true && Math.random() > 0.999 || pixel.alcoRecover === true) { + pixel.alcoDepri = undefined + pixel.alcoTime = undefined + pixel.alcoholic = false + pixel.alcoRecover = true +} +if (pixel.poisonImmune === true && pixel.poisoned != false) { + pixel.poisoned = false +} +if ((pixel.poisonImmune === true || pixel.immune === true) && pixel.sick != false) { + pixel.sick = false +} +if ((pixel.temp > 124.55 || pixel.burning) && Math.random() > 0.5) { + if (!pixel.burnt) { pixel.burnt = 1 } + else { pixel.burnt ++ } +} +if ((pixel.temp > 150 || pixel.burning) && Math.random() > 0.95) { + if (!pixel.burnt) { pixel.burnt = 1 } + else { pixel.burnt ++ } +} +if (pixel.char != pixel.burnt && pixel.burnt > pixel.char || !pixel.char) { + pixel.char = pixel.burnt +} +if (!isEmpty(pixel.x, pixel.y-1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y-1] + if (elements[hitPixel.element].isBio === true) { + if (hitPixel.oxygen < pixel.oxygen) { + if (pixel.heartAttached === true) { + hitPixel.oxygen += (elements[pixel.element].oxygTrans + 10) + pixel.oxygen -= (elements[pixel.element].oxygTrans + 9) + } + else { + hitPixel.oxygen += (elements[pixel.element].oxygTrans) + pixel.oxygen -= (elements[pixel.element].oxygTrans) + } + } + if (hitPixel.nutrition < pixel.nutrition) { + if (pixel.heartAttached === true) { + hitPixel.nutrition += (elements[pixel.element].nutrTrans + 10) + pixel.nutrition -= (elements[pixel.element].nutrTrans + 10) + } + else { + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) + } + } + if (hitPixel.speed < pixel.speed) { + hitPixel.speed += 1 + pixel.speed -= 1 + } + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + hitPixel.poisoned = true + } + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { + hitPixel.immune = true + } + if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burnt-- + } + if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burning = false + } + if (elements[hitPixel.element].isBlood === true && pixel.heartAttached === true && hitPixel.heartAttached === false && Math.random() > 0.5) { + hitPixel.heartAttached = true + } + } +} +else if (isEmpty(pixel.x, pixel.y-1) && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + if (Math.random() > 0.95) { + if (pixel.poisonImmune === true) { + createPixel("antibody",pixel.x,pixel.y-1) + } + else if (pixel.poisoned === true || pixel.sick === true) { + createPixel("infection",pixel.x,pixel.y-1) + } + else { + createPixel(elements[pixel.element].bleed,pixel.x,pixel.y-1) + } + } + pixel.oxygen -= 50 + pixel.nutrition -= 50 +} +if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) { + if (hitPixel.oxygen < pixel.oxygen) { + if (pixel.heartAttached === true) { + hitPixel.oxygen += (elements[pixel.element].oxygTrans + 10) + pixel.oxygen -= (elements[pixel.element].oxygTrans + 9) + } + else { + hitPixel.oxygen += (elements[pixel.element].oxygTrans) + pixel.oxygen -= (elements[pixel.element].oxygTrans) + } + } + if (hitPixel.nutrition < pixel.nutrition) { + if (pixel.heartAttached === true) { + hitPixel.nutrition += (elements[pixel.element].nutrTrans + 10) + pixel.nutrition -= (elements[pixel.element].nutrTrans + 10) + } + else { + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) + } + } + if (hitPixel.speed < pixel.speed) { + hitPixel.speed += 1 + pixel.speed -= 1 + } + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + hitPixel.poisoned = true + } + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { + hitPixel.immune = true + } + if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burnt-- + } + if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burning = false + } + if (elements[hitPixel.element].isBlood === true && pixel.heartAttached === true && hitPixel.heartAttached === false && Math.random() > 0.5) { + hitPixel.heartAttached = true + } + } +} +else if (isEmpty(pixel.x, pixel.y+1) && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + if (Math.random() > 0.95) { + if (pixel.poisonImmune === true) { + createPixel("antibody",pixel.x,pixel.y+1) + } + else if (pixel.poisoned === true || pixel.sick === true) { + createPixel("infection",pixel.x,pixel.y+1) + } + else { + createPixel(elements[pixel.element].bleed,pixel.x,pixel.y+1) + } + } + pixel.oxygen -= 50 + pixel.nutrition -= 50 +} +if (!isEmpty(pixel.x-1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x-1][pixel.y] + if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) { + if (hitPixel.oxygen < pixel.oxygen) { + if (pixel.heartAttached === true) { + hitPixel.oxygen += (elements[pixel.element].oxygTrans + 10) + pixel.oxygen -= (elements[pixel.element].oxygTrans + 9) + } + else { + hitPixel.oxygen += (elements[pixel.element].oxygTrans) + pixel.oxygen -= (elements[pixel.element].oxygTrans) + } + } + if (hitPixel.nutrition < pixel.nutrition) { + if (pixel.heartAttached === true) { + hitPixel.nutrition += (elements[pixel.element].nutrTrans + 10) + pixel.nutrition -= (elements[pixel.element].nutrTrans + 10) + } + else { + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) + } + } + if (hitPixel.speed < pixel.speed) { + hitPixel.speed += 1 + pixel.speed -= 1 + } + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + hitPixel.poisoned = true + } + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { + hitPixel.immune = true + } + if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burnt-- + } + if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burning = false + } + if (elements[hitPixel.element].isBlood === true && pixel.heartAttached === true && hitPixel.heartAttached === false && Math.random() > 0.5) { + hitPixel.heartAttached = true + } + } +} +else if (isEmpty(pixel.x-1, pixel.y) && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + if (Math.random() > 0.95) { + if (pixel.poisonImmune === true) { + createPixel("antibody",pixel.x-1,pixel.y) + } + else if (pixel.poisoned === true || pixel.sick === true) { + createPixel("infection",pixel.x-1,pixel.y) + } + else { + createPixel(elements[pixel.element].bleed,pixel.x-1,pixel.y) + } + } + pixel.oxygen -= 50 + pixel.nutrition -= 50 +} +if (!isEmpty(pixel.x+1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x+1][pixel.y] + if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) { + if (hitPixel.oxygen < pixel.oxygen) { + if (pixel.heartAttached === true) { + hitPixel.oxygen += (elements[pixel.element].oxygTrans + 10) + pixel.oxygen -= (elements[pixel.element].oxygTrans + 9) + } + else { + hitPixel.oxygen += (elements[pixel.element].oxygTrans) + pixel.oxygen -= (elements[pixel.element].oxygTrans) + } + } + if (hitPixel.nutrition < pixel.nutrition) { + if (pixel.heartAttached === true) { + hitPixel.nutrition += (elements[pixel.element].nutrTrans + 10) + pixel.nutrition -= (elements[pixel.element].nutrTrans + 10) + } + else { + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) + } + } + if (hitPixel.speed < pixel.speed) { + hitPixel.speed += 1 + pixel.speed -= 1 + } + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + hitPixel.poisoned = true + } + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { + hitPixel.immune = true + } + if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burnt-- + } + if (hitPixel.burning && (!pixel.burnt || pixel.burnt < 51) && Math.random() > 0.8) { + hitPixel.burning = false + } + if (elements[hitPixel.element].isBlood === true && pixel.heartAttached === true && hitPixel.heartAttached === false && Math.random() > 0.5) { + hitPixel.heartAttached = true + } + } +} +else if (isEmpty(pixel.x+1, pixel.y) && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + if (Math.random() > 0.95) { + if (pixel.poisonImmune === true) { + createPixel("antibody",pixel.x+1,pixel.y) + } + else if (pixel.poisoned === true || pixel.sick === true) { + createPixel("infection",pixel.x+1,pixel.y) + } + else { + createPixel(elements[pixel.element].bleed,pixel.x+1,pixel.y) + } + } + pixel.oxygen -= 50 + pixel.nutrition -= 50 +} +} + +doBioBone = function(pixel){ +if ((Math.random() > 0.995 && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() < (pixel.alcoDepri / 100) && pixel.alcoholic === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.60 && pixel.sick === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.5 && pixel.poisoned === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.burning === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp > 55 && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp < -10 && pixel.nutrition > 0 && pixel.oxygen > 0) || Math.random() > 0.85 && Math.random() < (pixel.burnt / 100)) { + pixel.nutrition -= 0.5 + pixel.oxygen-- +} +if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1 || pixel.speed < -100)) { + if (elements[pixel.element].isMultiDie === true) { + if (pixel.temp > 95) { + if (Math.random() < 0.75) { + changePixel(pixel,elements[pixel.element].normDie); + } + else { + changePixel(pixel,elements[pixel.element].heatDie); + } + } + else if (pixel.temp < -15) { + if (Math.random() < 0.75) { + changePixel(pixel,elements[pixel.element].normDie); + } + else { + changePixel(pixel,elements[pixel.element].coldDie); + } + } + else { + if (Math.random() < 0.999) { + changePixel(pixel,elements[pixel.element].normDie); + } + else { + changePixel(pixel,elements[pixel.element].roomDie); + } + } + } + else if (elements[pixel.element].isMultiDie === false) { + if (Math.random() < 0.75) { + changePixel(pixel,elements[pixel.element].normDie); + } + else { + changePixel(pixel,elements[pixel.element].otherDie); + } + } +} +if (pixel.nutrition === null || isNaN(pixel.nutrition)) { + pixel.nutrition = 500 +} +if (pixel.oxygen === null || isNaN(pixel.oxygen)) { + pixel.oxygen = 500 +} +if (pixel.speed === null || isNaN(pixel.speed)) { + pixel.speed = 0 +} +if ((pixel.alcoDepri || pixel.alcoDepri === 0) && pixel.alcoholic === true) { + pixel.alcoDepri += 1 +} +if (pixel.alcoTime < (pixelTicks - 10000) && pixel.alcoholic === true && Math.random() > 0.999 || pixel.alcoRecover === true) { + pixel.alcoDepri = undefined + pixel.alcoTime = undefined + pixel.alcoholic = false + pixel.alcoRecover = true +} +if (pixel.poisonImmune === true && pixel.poisoned != false) { + pixel.poisoned = false +} +if ((pixel.poisonImmune === true || pixel.immune === true) && pixel.sick != false) { + pixel.sick = false +} +if ((pixel.temp > 124.55 || pixel.burning) && Math.random() > 0.5) { + if (!pixel.burnt) { pixel.burnt = 1 } + else { pixel.burnt ++ } +} if ((pixel.temp > 66 || pixel.burning) && Math.random() > 0.95) { if (!pixel.burnt) { pixel.burnt = 1 } else { pixel.burnt ++ } @@ -771,11 +983,30 @@ if (!isEmpty(pixel.x, pixel.y-1, true)) { hitPixel.speed += 1 pixel.speed -= 1 } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.85) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.65) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.85) { hitPixel.poisoned = true } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.85) { - hitPixel.poisoned = false + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.65) { hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -801,11 +1032,30 @@ if (!isEmpty(pixel.x, pixel.y+1, true)) { hitPixel.speed += 1 pixel.speed -= 1 } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.85) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.65) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.85) { hitPixel.poisoned = true } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.85) { - hitPixel.poisoned = false + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.65) { hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -831,11 +1081,30 @@ if (!isEmpty(pixel.x-1, pixel.y, true)) { hitPixel.speed += 1 pixel.speed -= 1 } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.85) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.65) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.85) { hitPixel.poisoned = true } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.85) { - hitPixel.poisoned = false + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.65) { hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -861,11 +1130,30 @@ if (!isEmpty(pixel.x+1, pixel.y, true)) { hitPixel.speed += 1 pixel.speed -= 1 } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { + if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { + hitPixel.alcoholic = true + hitPixel.alcoTime = pixel.alcoTime + hitPixel.alcoDepri = 0 + } + if (hitPixel.alcoDepri > pixel.alcoDepri && pixel.alcoDepri) { + hitPixel.alcoDepri = pixel.alcoDepri + } + if (hitPixel.alcoTime < pixel.alcoTime && pixel.alcoTime) { + hitPixel.alcoTime = pixel.alcoTime + } + if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { + hitPixel.alcoRecover = true + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.85) { + hitPixel.sick = true + } + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.65) { + hitPixel.poisonImmune = true + } + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.85) { hitPixel.poisoned = true } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.85) { - hitPixel.poisoned = false + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.65) { hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -955,7 +1243,7 @@ elements.epidermis = { } } } - if (pixel.temp < 31 && Math.random() < 0.1) { + if (pixel.temp < 36 && Math.random() < 0.1) { pixel.temp += 1; } doBioNorm(pixel); @@ -1082,7 +1370,7 @@ elements.cloak_skin = { } } } - if (pixel.temp < 31 && Math.random() < 0.1) { + if (pixel.temp < 36 && Math.random() < 0.1) { pixel.temp += 1; } if (!isEmpty(pixel.x, pixel.y-1, true)) { @@ -1578,7 +1866,7 @@ elements.hairy_skin = { } } } - if (pixel.temp < 31 && Math.random() < 0.1) { + if (pixel.temp < 36 && Math.random() < 0.1) { pixel.temp += 1; } doDefaults(pixel); @@ -2498,8 +2786,8 @@ elements.blood_vessel = { "antibody": { elem2: null, func:function(pixel1,pixel2){ if (pixel1.immune != true) { pixel1.immune = true; } }, chance:0.0025 }, - "antidote": { elem2: null, func:function(pixel1,pixel2){ if (pixel1.immune != true) { - pixel1.immune = true; + "antidote": { elem2: null, func:function(pixel1,pixel2){ if (pixel1.poisonImmune != true) { + pixel1.poisonImmune = true; } }, chance:0.02 }, "poison": { elem2: null, func:function(pixel1,pixel2){ if (pixel1.poisoned != true) { pixel1.poisoned = true; @@ -2543,6 +2831,9 @@ elements.infected_vessel = { }, tick: function(pixel) { doBioBlood(pixel); + if (Math.random() > 0.995 && pixel.sick != true) { + pixel.sick = true + } if (Math.random() > 0.95 && pixel.immune === true) { pixel.element = "blood_vessel" pixel.color = elements.blood_vessel.color @@ -2554,7 +2845,6 @@ elements.infected_vessel = { speed: 0, poisoned: false, immune: false, - heartAttached: false, }, reactions: { @@ -2607,6 +2897,12 @@ elements.white_blood_cell = { hitPixel.element = "blood_vessel" hitPixel.color = elements.blood_vessel.color } + if (hitPixel.sick === true && (Math.random() > 0.95 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050)) || Math.random() > 0.995)) { + hitPixel.sick = false + if (Math.random() > 0.995 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + pixel.immune = true + } + } } } if (!isEmpty(pixel.x, pixel.y+1, true)) { @@ -2617,6 +2913,12 @@ elements.white_blood_cell = { hitPixel.color = elements.blood_vessel.color } } + if (hitPixel.sick === true && (Math.random() > 0.95 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050)) || Math.random() > 0.995)) { + hitPixel.sick = false + if (Math.random() > 0.995 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + pixel.immune = true + } + } } if (!isEmpty(pixel.x-1, pixel.y, true)) { var hitPixel = pixelMap[pixel.x-1][pixel.y] @@ -2626,6 +2928,12 @@ elements.white_blood_cell = { hitPixel.color = elements.blood_vessel.color } } + if (hitPixel.sick === true && (Math.random() > 0.95 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050)) || Math.random() > 0.995)) { + hitPixel.sick = false + if (Math.random() > 0.995 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + pixel.immune = true + } + } } if (!isEmpty(pixel.x+1, pixel.y, true)) { var hitPixel = pixelMap[pixel.x+1][pixel.y] @@ -2635,6 +2943,12 @@ elements.white_blood_cell = { hitPixel.color = elements.blood_vessel.color } } + if (hitPixel.sick === true && (Math.random() > 0.95 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050)) || Math.random() > 0.995)) { + hitPixel.sick = false + if (Math.random() > 0.995 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + pixel.immune = true + } + } } }, properties: { @@ -2656,8 +2970,8 @@ elements.white_blood_cell = { "antibody": { elem2: null, func:function(pixel1,pixel2){ if (pixel1.immune != true) { pixel1.immune = true; } }, chance:0.0025 }, - "antidote": { elem2: null, func:function(pixel1,pixel2){ if (pixel1.immune != true) { - pixel1.immune = true; + "antidote": { elem2: null, func:function(pixel1,pixel2){ if (pixel1.poisonImmune != true) { + pixel1.poisonImmune = true; } }, chance:0.02 }, "poison": { elem2: null, func:function(pixel1,pixel2){ if (pixel1.poisoned != true) { pixel1.poisoned = true; @@ -3114,34 +3428,63 @@ elements.brain = { if (!isEmpty(pixel.x, pixel.y-1, true)) { var hitPixel = pixelMap[pixel.x][pixel.y-1] doElectricity(hitPixel); - if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed - pixel.alcoDepri) / 2050))) { pixel.chargeCD = 16 hitPixel.charge = 0.5 } + if ((elements[hitPixel.element].id === elements.brain.id || elements[hitPixel.element].id === elements.hypothalamus.id) && Math.random() > 0.75 && pixel.feel === true && hitPixel.feel != true) { + hitPixel.feel = true + } } if (!isEmpty(pixel.x, pixel.y+1, true)) { var hitPixel = pixelMap[pixel.x][pixel.y+1] doElectricity(hitPixel); - if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + if (elements[hitPixel.element].id === elements.nerve.id && pixel.feel == true && Math.random() > 0.75) { // electrical signals do this 01101001001000000110011001100101011001010110110000101110001000000110100100100000011000010110110100100000011000010110110001101001011101100110010100101110001000000110100001100101011011000111000000100000011011010110010100101110 + if (!pixel.stage || pixel.stage > 224) { + pixel.stage = 1 + } + else if (pixel.stage) { + pixel.stage += 0.25 + } + pixel.digitToCheck = (Math.floor(pixel.stage)) + pixel.number = "01101001001000000110011001100101011001010110110000101110001000000110100100100000011000010110110100100000011000010110110001101001011101100110010100101110001000000110100001100101011011000111000000100000011011010110010100101110" + pixel.sentientCheck = pixel.number.toString()[pixel.digitToCheck] === "1" + if (pixel.sentientCheck === true /* (pixel.stage === 1 || pixel.stage === 2 || pixel.stage === 4 || pixel.stage === 7 || pixel.stage === 10 || pixel.stage === 17 || pixel.stage === 18 || pixel.stage === 21 || pixel.stage === 22 || pixel.stage === 25 || pixel.stage === 26 || pixel.stage === 29 || pixel.stage === 31 || pixel.stage === 33 || pixel.stage === 34 || pixel.stage === 37 || pixel.stage === 39 || pixel.stage === 41 || pixel.stage === 42 || pixel.stage === 44 || pixel.stage === 45 || pixel.stage === 50 || pixel.stage === 52 || pixel.stage === 53 || pixel.stage === 54) */ ) { + hitPixel.lightcharge = true + } + if (pixel.sentientCheck !== true) { + hitPixel.darkcharge = true + } + } + if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed - pixel.alcoDepri) / 2050))) { pixel.chargeCD = 16 hitPixel.charge = 0.5 } + if ((elements[hitPixel.element].id === elements.brain.id || elements[hitPixel.element].id === elements.hypothalamus.id) && Math.random() > 0.75 && pixel.feel === true && hitPixel.feel != true) { + hitPixel.feel = true + } } if (!isEmpty(pixel.x-1, pixel.y, true)) { var hitPixel = pixelMap[pixel.x-1][pixel.y] doElectricity(hitPixel); - if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed - pixel.alcoDepri) / 2050))) { pixel.chargeCD = 16 hitPixel.charge = 0.5 } + if ((elements[hitPixel.element].id === elements.brain.id || elements[hitPixel.element].id === elements.hypothalamus.id) && Math.random() > 0.75 && pixel.feel === true && hitPixel.feel != true) { + hitPixel.feel = true + } } if (!isEmpty(pixel.x+1, pixel.y, true)) { var hitPixel = pixelMap[pixel.x+1][pixel.y] doElectricity(hitPixel); - if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed) / 2050))) { + if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed - pixel.alcoDepri) / 2050))) { pixel.chargeCD = 16 hitPixel.charge = 0.5 } + if ((elements[hitPixel.element].id === elements.brain.id || elements[hitPixel.element].id === elements.hypothalamus.id) && Math.random() > 0.75 && pixel.feel === true && hitPixel.feel != true) { + hitPixel.feel = true + } } if (pixel.charge) { pixel.charge = 0; @@ -3177,7 +3520,7 @@ elements.brain = { movable: false, } -elements.amygdala = { // functionality coming soon! +elements.amygdala = { color: ["#B33E93","#B33E93","#f5ced5","#e87b8f"], category: "nervous system", behavior: behaviors.WALL, @@ -3194,6 +3537,30 @@ elements.amygdala = { // functionality coming soon! tick: function(pixel) { doDefaults(pixel); doBioNorm(pixel); + if (!isEmpty(pixel.x, pixel.y-1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y-1] + if (elements[hitPixel.element].id === elements.brain.id && Math.random() > 0.75 && hitPixel.feel != true) { + hitPixel.feel = true + } + } + if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + if (elements[hitPixel.element].id === elements.brain.id && Math.random() > 0.75 && hitPixel.feel != true) { + hitPixel.feel = true + } + } + if (!isEmpty(pixel.x-1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x-1][pixel.y] + if (elements[hitPixel.element].id === elements.brain.id && Math.random() > 0.75 && hitPixel.feel != true) { + hitPixel.feel = true + } + } + if (!isEmpty(pixel.x+1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x+1][pixel.y] + if (elements[hitPixel.element].id === elements.brain.id && Math.random() > 0.75 && hitPixel.feel != true) { + hitPixel.feel = true + } + } if (pixel.charge) { pixel.charge = 0; pixel.chargeCD = 16; @@ -3227,7 +3594,7 @@ elements.amygdala = { // functionality coming soon! renderer: renderPresets.FLESHBURN, movable: false, hidde: true, - desc: "No unique functionality right now, will have it soon though!" + desc: "Makes brains sentient. Don't question it." } elements.hypothalamus = { @@ -3247,8 +3614,52 @@ elements.hypothalamus = { tick: function(pixel) { doDefaults(pixel); doBioNorm(pixel); - if (pixel.temp > 35) { pixel.temp -= 10; } - else if (pixel.temp < 15) { pixel.temp += 10; } + if (pixel.temp > 42) { pixel.temp -= 5; } + else if (pixel.temp < 32) { pixel.temp += 5; } + if (!isEmpty(pixel.x, pixel.y-1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y-1] + doElectricity(hitPixel); + if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed - pixel.alcoDepri) / 2050))) { + pixel.chargeCD = 16 + hitPixel.charge = 0.5 + } + if ((elements[hitPixel.element].id === elements.brain.id || elements[hitPixel.element].id === elements.hypothalamus.id) && Math.random() > 0.75 && pixel.feel === true && hitPixel.feel != true) { + hitPixel.feel = true + } + } + if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + doElectricity(hitPixel); + if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed - pixel.alcoDepri) / 2050))) { + pixel.chargeCD = 16 + hitPixel.charge = 0.5 + } + if ((elements[hitPixel.element].id === elements.brain.id || elements[hitPixel.element].id === elements.hypothalamus.id) && Math.random() > 0.75 && pixel.feel === true && hitPixel.feel != true) { + hitPixel.feel = true + } + } + if (!isEmpty(pixel.x-1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x-1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed - pixel.alcoDepri) / 2050))) { + pixel.chargeCD = 16 + hitPixel.charge = 0.5 + } + if ((elements[hitPixel.element].id === elements.brain.id || elements[hitPixel.element].id === elements.hypothalamus.id) && Math.random() > 0.75 && pixel.feel === true && hitPixel.feel != true) { + hitPixel.feel = true + } + } + if (!isEmpty(pixel.x+1, pixel.y, true)) { + var hitPixel = pixelMap[pixel.x+1][pixel.y] + doElectricity(hitPixel); + if (elements[hitPixel.element].id === elements.nerve.id && Math.random() > 0.75 && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen + pixel.speed - pixel.alcoDepri) / 2050))) { + pixel.chargeCD = 16 + hitPixel.charge = 0.5 + } + if ((elements[hitPixel.element].id === elements.brain.id || elements[hitPixel.element].id === elements.hypothalamus.id) && Math.random() > 0.75 && pixel.feel === true && hitPixel.feel != true) { + hitPixel.feel = true + } + } if (pixel.charge) { pixel.charge = 0; pixel.chargeCD = 16; @@ -3281,13 +3692,12 @@ elements.hypothalamus = { isBio: true, renderer: renderPresets.FLESHBURN, movable: false, - desc: "Brain temperature regulation!" + desc: "Regulates brain temperature." } elements.nerve = { color: "#B33E93", category: "nervous system", - behavior: behaviors.WALL, nutrTrans: 20, oxygTrans: 25, isMultiDie: true, @@ -3295,16 +3705,58 @@ elements.nerve = { roomDie: "rotten_meat", coldDie: "frozen_meat", heatDie: "cooked_meat", + conduct: 1, hoverStat: function(pixel) { return "Ntr:"+pixel.nutrition+" O2:"+pixel.oxygen }, tick: function(pixel) { doDefaults(pixel); doBioNorm(pixel); + if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + if (elements[hitPixel.element].id === elements.nerve.id && pixel.darkcharge === true && pixel.darkchargeCD !== true) { + pixel.darkcharge = false + pixel.darkchargeCD = true + hitPixel.darkcharge = true + pixel.darktransmit = true + } + } + if (isEmpty(pixel.x, pixel.y+1) || elements[pixelMap[pixel.x][pixel.y+1].element].id != elements.nerve.id) { + if (pixel.darkcharge === true) { + pixel.darkcharge = false + pixel.darkchargeCD = true + } + } + if (pixel.darkchargeCD === true && pixel.darktransmit !== true) { + pixel.darkchargeCD = false + } + if (pixel.darktransmit === true) { + pixel.darktransmit = false + } + if (!isEmpty(pixel.x, pixel.y+1, true)) { + var hitPixel = pixelMap[pixel.x][pixel.y+1] + if (elements[hitPixel.element].id === elements.nerve.id && pixel.lightcharge === true && pixel.lightchargeCD !== true) { + pixel.lightcharge = false + pixel.lightchargeCD = true + hitPixel.lightcharge = true + pixel.lighttransmit = true + } + } + if (isEmpty(pixel.x, pixel.y+1) || elements[pixelMap[pixel.x][pixel.y+1].element].id != elements.nerve.id) { + if (pixel.lightcharge === true) { + pixel.lightcharge = false + pixel.lightchargeCD = true + } + } + if (pixel.lightchargeCD === true && pixel.lighttransmit !== true) { + pixel.lightchargeCD = false + } + if (pixel.lighttransmit === true) { + pixel.lighttransmit = false + } }, density: 2710, state: "solid", - conduct: 1, tempHigh: 200, stateHigh: "cooked_meat", tempLow: -25, @@ -3327,7 +3779,7 @@ elements.nerve = { }, isBio: true, - renderer: renderPresets.FLESHBURN, + renderer: renderPresets.NERVE, movable: false, desc: "Basically a biowire, try connecting it to a brain!" } @@ -3336,9 +3788,9 @@ elements.throat_lining = { color: "#bc6157", category: "nutrition", behavior: [ - "MX%5|DL:stomach_acid,explosive_acid,decomposer_acid,carni_acid,herbi_acid%5 AND MX%5|MX%5", - "MX%7.5 AND DL:stomach_acid,explosive_acid,decomposer_acid,carni_acid,herbi_acid%5|XX|MX%7.5 AND DL:stomach_acid,explosive_acid,decomposer_acid,carni_acid,herbi_acid%5", - "XX|DL:stomach_acid,explosive_acid,decomposer_acid,carni_acid,herbi_acid%5|XX", + "MX%5|DL:stomach_acid,explosive_acid,carni_acid,herbi_acid%5 AND MX%5|MX%5", + "MX%7.5 AND DL:stomach_acid,explosive_acid,carni_acid,herbi_acid%5|XX|MX%7.5 AND DL:stomach_acid,explosive_acid,carni_acid,herbi_acid%5", + "XX|DL:stomach_acid,explosive_acid,carni_acid,herbi_acid%5|XX", ], nutrTrans: 20, oxygTrans: 25, @@ -3413,31 +3865,74 @@ elements.intestines = { else { changePixel(hitPixel,"stench"); } - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true - }; + } if (hitPixel.immune === true && Math.random() > 0.5) { - pixel.poisoned = false + pixel.sick = false pixel.immune = true - }; + } + if (hitPixel.sick === true && Math.random() > 0.95) { + pixel.sick = true + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + if (pixel.alcoDepri) { + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + } + if (hitPixel.poisonImmune === true && Math.random() > 0.5) { + pixel.poisoned = false + pixel.sick = false + pixel.poisonImmune = true + } } else if (elements[hitPixel.element].id === elements.gaseous_material.id && Math.random() > 0.99) { changePixel(hitPixel,"stench"); - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true - }; + } if (hitPixel.immune === true && Math.random() > 0.5) { - pixel.poisoned = false + pixel.sick = false pixel.immune = true - }; + } + if (hitPixel.sick === true && Math.random() > 0.95) { + pixel.sick = true + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + if (pixel.alcoDepri) { + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (hitPixel.poisonImmune === true && Math.random() > 0.5) { + pixel.poisoned = false + pixel.sick = false + pixel.poisonImmune = true + } } } if (!isEmpty(pixel.x, pixel.y+1, true)) { @@ -3449,31 +3944,79 @@ elements.intestines = { else { changePixel(hitPixel,"stench"); } - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true - }; + } if (hitPixel.immune === true && Math.random() > 0.5) { - pixel.poisoned = false + pixel.sick = false pixel.immune = true - }; + } + if (hitPixel.sick === true && Math.random() > 0.95) { + pixel.sick = true + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + if (pixel.alcoDepri) { + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (hitPixel.poisonImmune === true && Math.random() > 0.5) { + pixel.poisoned = false + pixel.sick = false + pixel.poisonImmune = true + } } else if (elements[hitPixel.element].id === elements.gaseous_material.id && Math.random() > 0.99) { changePixel(hitPixel,"stench"); - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true - }; + } if (hitPixel.immune === true && Math.random() > 0.5) { - pixel.poisoned = false + pixel.sick = false pixel.immune = true - }; + } + if (hitPixel.sick === true && Math.random() > 0.95) { + pixel.sick = true + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + if (pixel.alcoDepri) { + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (hitPixel.poisonImmune === true && Math.random() > 0.5) { + pixel.poisoned = false + pixel.sick = false + pixel.poisonImmune = true + } } } if (!isEmpty(pixel.x-1, pixel.y, true)) { @@ -3485,17 +4028,41 @@ elements.intestines = { else { changePixel(hitPixel,"stench"); } - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true - }; + } if (hitPixel.immune === true && Math.random() > 0.5) { - pixel.poisoned = false + pixel.sick = false pixel.immune = true - }; + } + if (hitPixel.sick === true && Math.random() > 0.95) { + pixel.sick = true + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + if (pixel.alcoDepri) { + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (hitPixel.poisonImmune === true && Math.random() > 0.5) { + pixel.poisoned = false + pixel.sick = false + pixel.poisonImmune = true + } } else if (elements[hitPixel.element].id === elements.gaseous_material.id && Math.random() > 0.99) { changePixel(hitPixel,"stench"); @@ -3503,11 +4070,35 @@ elements.intestines = { hitPixel.nutrition = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true - }; + } if (hitPixel.immune === true && Math.random() > 0.5) { - pixel.poisoned = false + pixel.sick = false pixel.immune = true - }; + } + if (hitPixel.sick === true && Math.random() > 0.95) { + pixel.sick = true + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + if (pixel.alcoDepri) { + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (hitPixel.poisonImmune === true && Math.random() > 0.5) { + pixel.poisoned = false + pixel.sick = false + pixel.poisonImmune = true + } } } if (!isEmpty(pixel.x+1, pixel.y, true)) { @@ -3519,31 +4110,79 @@ elements.intestines = { else { changePixel(hitPixel,"stench"); } - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true - }; + } if (hitPixel.immune === true && Math.random() > 0.5) { - pixel.poisoned = false + pixel.sick = false pixel.immune = true - }; + } + if (hitPixel.sick === true && Math.random() > 0.95) { + pixel.sick = true + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + if (pixel.alcoDepri) { + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (hitPixel.poisonImmune === true && Math.random() > 0.5) { + pixel.poisoned = false + pixel.sick = false + pixel.poisonImmune = true + } } else if (elements[hitPixel.element].id === elements.gaseous_material.id && Math.random() > 0.99) { changePixel(hitPixel,"stench"); - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true - }; + } if (hitPixel.immune === true && Math.random() > 0.5) { - pixel.poisoned = false + pixel.sick = false pixel.immune = true - }; + } + if (hitPixel.sick === true && Math.random() > 0.95) { + pixel.sick = true + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + if (pixel.alcoDepri) { + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + } + if (hitPixel.alcoholic === true && Math.random() > 0.95) { + pixel.alcoholic = true + pixel.alcoTime = pixelTicks + pixel.alcoDepri = 0 + } + if (hitPixel.poisonImmune === true && Math.random() > 0.5) { + pixel.poisoned = false + pixel.sick = false + pixel.poisonImmune = true + } } } }, @@ -3610,9 +4249,9 @@ elements.appendix = { else { changePixel(hitPixel,"stench"); } - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true @@ -3624,9 +4263,9 @@ elements.appendix = { } else if (elements[hitPixel.element].id === elements.gaseous_material.id && Math.random() > 0.99) { changePixel(hitPixel,"stench"); - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true @@ -3646,9 +4285,9 @@ elements.appendix = { else { changePixel(hitPixel,"stench"); } - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true @@ -3660,9 +4299,9 @@ elements.appendix = { } else if (elements[hitPixel.element].id === elements.gaseous_material.id && Math.random() > 0.99) { changePixel(hitPixel,"stench"); - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true @@ -3682,9 +4321,9 @@ elements.appendix = { else { changePixel(hitPixel,"stench"); } - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true @@ -3716,9 +4355,9 @@ elements.appendix = { else { changePixel(hitPixel,"stench"); } - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true @@ -3730,9 +4369,9 @@ elements.appendix = { } else if (elements[hitPixel.element].id === elements.gaseous_material.id && Math.random() > 0.99) { changePixel(hitPixel,"stench"); - pixel.nutrition += hitPixel.nutrition; + pixel.nutrition += (hitPixel.nutrition * 10); hitPixel.nutrition = 0; - pixel.speed += hitPixel.speed; + pixel.speed += (hitPixel.speed * 2); hitPixel.speed = 0; if (hitPixel.poisoned === true && Math.random() > 0.9) { pixel.poisoned = true @@ -4466,57 +5105,6 @@ elements.stomach_lining = { desc: "Makes stomach acid to digest foods!" } -elements.decomposer_stomach = { - color: "#A4593F", - category: "nutrition", - behavior: [ - "XX|CR:decomposer_acid%5|XX", - "CR:decomposer_acid%5|XX|CR:decomposer_acid%5", - "XX|CR:decomposer_acid%5|XX", - ], - nutrTrans: 20, - oxygTrans: 25, - isMultiDie: true, - normDie: "meat", - roomDie: "rotten_meat", - coldDie: "frozen_meat", - heatDie: "cooked_meat", - hoverStat: function(pixel) { - return "Ntr:"+pixel.nutrition+" O2:"+pixel.oxygen - }, - tick: function(pixel) { - doDefaults(pixel); - doBioNorm(pixel); - }, - density: 2710, - state: "solid", - conduct: .001, - tempHigh: 200, - stateHigh: "cooked_meat", - tempLow: -25, - stateLow: "frozen_meat", - burn: 5, - burnTime: 350, - burnInto: "cooked_meat", - breakInto: ["blood","meat"], - forceSaveColor: true, - reactions: { - "cancer": { elem1:"cancer", chance:0.0005 }, - "radiation": { elem1:["ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 }, - }, - properties: { - oxygen: 1000, - nutrition: 1000, - speed: 0, - poisoned: false, - immune: false, - - }, - movable: false, - isBio: true, - renderer: renderPresets.FLESHBURN, -} - elements.herbi_stomach = { color: "#B77A3D", category: "nutrition", @@ -4566,6 +5154,7 @@ elements.herbi_stomach = { movable: false, isBio: true, renderer: renderPresets.FLESHBURN, + desc: "Makes a different stomach acid to digest plants!" } elements.carni_stomach = { @@ -4617,6 +5206,7 @@ elements.carni_stomach = { movable: false, isBio: true, renderer: renderPresets.FLESHBURN, + desc: "Makes a different stomach acid to digest meat!" } elements.explosive_stomach = { @@ -4668,6 +5258,7 @@ elements.explosive_stomach = { movable: false, isBio: true, renderer: renderPresets.FLESHBURN, + desc: "Makes an efficient yet explosive stomach acid to digest foods!" } elements.stomach_valve = { @@ -4732,6 +5323,7 @@ elements.stomach_valve = { movable: false, isBio: true, renderer: renderPresets.FLESHBURN, + desc: "Blocks acid, lets other things through!" } elements.sphincter = { @@ -4758,7 +5350,7 @@ elements.sphincter = { } } else { - if (isEmpty(pixel.x, pixel.y+1) && Math.random() > 0.995) { + if (isEmpty(pixel.x, pixel.y+1) && Math.random() > 0.995 && elements[hitPixel.element].id !== elements.digested_material.id && elements[hitPixel.element].id !== elements.gaseous_material.id) { tryMove(hitPixel,pixel.x,pixel.y+1); } } @@ -4791,6 +5383,7 @@ elements.sphincter = { movable: false, isBio: true, renderer: renderPresets.FLESHBURN, + desc: "Blocks undigested material, lets other things through!" } elements.real_udder = { @@ -4869,6 +5462,7 @@ elements.real_udder = { movable: false, isBio: true, renderer: renderPresets.FLESHBURN, + desc: "Turns nutrition into milk!" } elements.biotorch = { @@ -4994,14 +5588,15 @@ elements.biotorch = { conduct: .001, movable: false, isBio: true, + desc: "Turns its oxygen into fire, and works as a heat shield!" } elements.digested_material = { color: "#B5C306", behavior: [ "XX|XX|XX", - "SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%3 AND M2%5|XX|SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%3 AND M2%5", - "SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%5 AND M2%75|SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%10 AND M1|SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%5 AND M2%75", + "SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%3 AND M2%5|XX|SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%3 AND M2%5", + "SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%5 AND M2%75|SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%10 AND M1|SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%5 AND M2%75", ], properties: { nutrition: 100, @@ -5014,8 +5609,8 @@ elements.digested_material = { stain: 0.001, darkText: true, hidden: true, - tempHigh: 90, - stateHigh: "dirty_water", + tempHigh: 95, + stateHigh: ["dirty_water","dirty_water","excrement"], tempLow: -30, stateLow: "dirty_ice", } @@ -5024,8 +5619,8 @@ elements.gaseous_material = { color: "#B5C306", behavior: [ "XX|XX|XX", - "SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%3 AND M2%35|XX|SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%3 AND M2%35", - "SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%5 AND M2%50|SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%10 AND M1|SW:stomach_acid,decomposer_acid,herbi_acid,carni_acid,explosive_acid%5 AND M2%50", + "SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%3 AND M2%35|XX|SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%3 AND M2%35", + "SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%5 AND M2%50|SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%10 AND M1|SW:stomach_acid,herbi_acid,carni_acid,explosive_acid%5 AND M2%50", ], properties: { nutrition: 100, @@ -5037,8 +5632,8 @@ elements.gaseous_material = { stain: 0.001, darkText: true, hidden: true, - tempHigh: 95, - stateHigh: "dirty_water", + tempHigh: 90, + stateHigh: ["dirty_water","dirty_water","excrement"], tempLow: -35, stateLow: "dirty_ice", } @@ -5120,13 +5715,13 @@ elements.stomach_acid = { color: ["#b5cf91","#288f2a"], behavior: [ "ADB%5|ADB%5|ADB%5", - "ADB%10 AND M2|DL%0.03|ADB%10 AND M2", + "ADB%10 AND M2|XX|ADB%10 AND M2", "ADB%10 AND M2|ADB%15 AND M1|ADB%10 AND M2", ], ignore: ["amphib_skin","amphib_dermis","acidic_flesh","acid_vessel","throat_lining","explosive_stomach","stomach_lining","stomach_valve","slime","gaseous_material","digested_material","glass","rad_glass","glass_shard","rad_shard","stained_glass","baked_clay","acid_gas","neutral_acid","acid_cloud","water","salt_water","sugar_water","dirty_water","copper","gold","porcelain","plastic","bead","microplastic","molten_plastic","pool_water","chlorine","hydrogen","gold_coin","silver","nickel","calcium","bone","earthquake","tornado","tsunami","liquid_light","sensor"], reactions: { - "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10}, chance:0.5 }, - "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5, "speed":-1}, chance:0.02 }, + "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10, "poisonImmune":true}, chance:0.5 }, + "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5, "speed":-1, "sick":true}, chance:0.02 }, "water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":0, "speed":2}, chance:0.02 }, "salt_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, "sugar_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":10, "speed":-1}, chance:0.02 }, @@ -5137,9 +5732,10 @@ elements.stomach_acid = { "meat": { elem2:"digested_material", attr2:{"nutrition":30, "speed":-1}, chance:0.02 }, "cooked_meat": { elem2:"digested_material", attr2:{"nutrition":60}, chance:0.02 }, "broth": { elem1:null, elem2:"digested_material", attr2:{"nutrition":45}, chance:0.02 }, - "rotten_meat": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":-10, "speed":-10}, chance:0.02 }, + "rotten_meat": { elem2:["digested_material","digested_material","ammonia"], attr2:{"nutrition":-10, "speed":-10, "sick":true}, chance:0.02 }, "cured_meat": { elem2:"digested_material", attr2:{"nutrition":50}, chance:0.02 }, "cheese": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, + "rotten_cheese": { elem2:["digested_material"], attr2:{"nutrition":-10, "speed":-10, "sick":true}, chance:0.02 }, "cheese_powder": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, "lettuce": { elem2:"digested_material", attr2:{"nutrition":40}, chance:0.02 }, "herb": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, @@ -5161,10 +5757,10 @@ elements.stomach_acid = { "flea": { elem2:"gaseous_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, "fly": { elem2:"gaseous_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, "firefly": { elem2:"gaseous_material", attr2:{"nutrition":5, "speed":-5, "poisoned":true}, chance:0.02 }, - "stinkbug": { elem2:"gaseous_material", attr2:{"nutrition":4, "speed":-5}, chance:0.02 }, + "stinkbug": { elem2:"gaseous_material", attr2:{"nutrition":4, "speed":-5, "sick":true}, chance:0.02 }, "bee": { elem2:"gaseous_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, "spider": { elem2:"gaseous_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, - "rat": { elem2:"digested_material", attr2:{"nutrition":-10, "speed":-5, "poisoned":true}, chance:0.01 }, + "rat": { elem2:"digested_material", attr2:{"nutrition":-10, "speed":-5, "sick":true}, chance:0.01 }, "bird": { elem2:"digested_material", attr2:{"nutrition":-10, "speed":-1}, chance:0.01 }, "fish": { elem2:"digested_material", attr2:{"nutrition":5, "speed":-1}, chance:0.01 }, "head": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-2}, chance:0.01 }, @@ -5180,12 +5776,14 @@ elements.stomach_acid = { "bleach": { elem2:"digested_material", attr2:{"nutrition":-500, "speed":-10, "poisoned":true}, chance:0.02 }, "poison": { elem2:"digested_material", attr2:{"nutrition":-750, "speed":-10, "poisoned":true}, chance:0.02 }, "cyanide": { elem2:"digested_material", attr2:{"nutrition":-750, "speed":-10, "poisoned":true}, chance:0.02 }, + "poison_gas": { elem2:"gaseous_material", attr2:{"nutrition":-750, "speed":-10, "poisoned":true}, chance:0.02 }, + "cyanide_gas": { elem2:"gaseous_material", attr2:{"nutrition":-750, "speed":-10, "poisoned":true}, chance:0.02 }, "soap": { elem2:"digested_material", attr2:{"nutrition":-20, "speed":-10}, chance:0.02 }, "mercury": { elem2:"digested_material", attr2:{"nutrition":-500, "speed":-10, "poisoned":true}, chance:0.02 }, "chlorine": { elem2:"gaseous_material", attr2:{"nutrition":-500, "speed":-10, "poisoned":true}, chance:0.02 }, - "pool_water": { elem2:"digested_material", attr2:{"nutrition":-400, "speed":-10}, chance:0.02 }, - "vaccine": { elem2:"digested_material", attr2:{"nutrition":1, "speed":-1, "immune":true}, chance:0.02 }, - "antidote": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1, "immune":true}, chance:0.02 }, + "pool_water": { elem2:"digested_material", attr2:{"nutrition":-10, "speed":-10}, chance:0.02 }, + "vaccine": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":1, "immune":true}, chance:0.02 }, + "antidote": { elem2:"digested_material", attr2:{"nutrition":1, "speed":1, "poisonImmune":true}, chance:0.02 }, "coffee": { elem2:"digested_material", attr2:{"nutrition":20, "speed":10}, chance:0.02 }, "tomato": { elem2:"digested_material", attr2:{"nutrition":45}, chance:0.02 }, "grape": { elem2:"digested_material", attr2:{"nutrition":45}, chance:0.02 }, @@ -5214,15 +5812,15 @@ elements.stomach_acid = { "coffee_bean": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":20}, chance:0.02 }, "coffee_ground": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":15}, chance:0.02 }, "yeast": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":-1}, chance:0.02 }, - "alcohol": { elem2:"digested_material", attr2:{"nutrition":5, "speed":-15}, chance:0.02 }, + "alcohol": { elem2:"digested_material", attr2:{"nutrition":5, "speed":-5, "alcoholic": true}, chance:0.02 }, "honey": { elem2:"digested_material", attr2:{"nutrition":35, "speed":3}, chance:0.02 }, "blood": { elem2:"digested_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, - "excrement": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10}, chance:0.02 }, - "urine": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10}, chance:0.02 }, + "excrement": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10, "sick":true}, chance:0.02 }, + "urine": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10, "sick":true}, chance:0.02 }, "tea": { elem2:"digested_material", attr2:{"nutrition":10, "speed":10}, chance:0.02 }, - "infection": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-5}, chance:0.02 }, - "cancer": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-15}, chance:0.02 }, - "plague": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10}, chance:0.02 }, + "infection": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-5, "sick":true}, chance:0.02 }, + "cancer": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-15, "sick":true}, chance:0.02 }, + "plague": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10, "sick":true}, chance:0.02 }, "glue": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-10}, chance:0.02 }, }, category: "nutrition", @@ -5241,13 +5839,13 @@ elements.herbi_acid = { color: ["#A8E54F","#5BC217"], behavior: [ "XX|ADB%5|XX", - "ADB%5 AND M2|DL%0.03|ADB%5 AND M2", + "ADB%5 AND M2|XX|ADB%5 AND M2", "ADB%5 AND M2|ADB%5 AND M1|ADB%5 AND M2", ], ignore: ["amphib_skin","amphib_dermis","acidic_flesh","acid_vessel","throat_lining","explosive_stomach","herbi_stomach","carni_stomach","stomach_lining","stomach_valve","slime","gaseous_material","digested_material","glass","rad_glass","glass_shard","rad_shard","stained_glass","baked_clay","acid_gas","neutral_acid","acid_cloud","water","salt_water","sugar_water","dirty_water","copper","gold","porcelain","plastic","bead","microplastic","molten_plastic","pool_water","chlorine","hydrogen","gold_coin","silver","nickel","calcium","bone","earthquake","tornado","tsunami","liquid_light","sensor"], reactions: { - "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10}, chance:0.5 }, - "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5, "speed":-3}, chance:0.02 }, + "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10, "poisonImmune":true}, chance:0.5 }, + "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5, "speed":-3, "sick":true}, chance:0.02 }, "water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":0, "speed":5}, chance:0.02 }, "salt_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, "sugar_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":10, "speed":1}, chance:0.02 }, @@ -5259,9 +5857,10 @@ elements.herbi_acid = { "meat": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-1}, chance:0.02 }, "cooked_meat": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":1}, chance:0.02 }, "broth": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5}, chance:0.02 }, - "rotten_meat": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":-25, "speed":-20}, chance:0.02 }, + "rotten_meat": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":-25, "speed":-20, "sick":true}, chance:0.02 }, "cured_meat": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":-1}, chance:0.02 }, "cheese": { elem2:"digested_material", attr2:{"nutrition":40}, chance:0.02 }, + "rotten_cheese": { elem2:["digested_material"], attr2:{"nutrition":-10, "speed":-10, "sick":true}, chance:0.02 }, "cheese_powder": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, "vine": { elem2:"digested_material", attr2:{"nutrition":60}, chance:0.02 }, "grass": { elem2:"digested_material", attr2:{"nutrition":60}, chance:0.02 }, @@ -5290,7 +5889,7 @@ elements.herbi_acid = { "stinkbug": { elem2:"gaseous_material", attr2:{"nutrition":-11, "speed":-5}, chance:0.02 }, "bee": { elem2:"gaseous_material", attr2:{"nutrition":-9}, chance:0.02 }, "spider": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-1}, chance:0.02 }, - "rat": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-5}, chance:0.02 }, + "rat": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-5, "sick":true}, chance:0.02 }, "bird": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-1}, chance:0.02 }, "fish": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-1}, chance:0.02 }, "head": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-2}, chance:0.02 }, @@ -5306,12 +5905,14 @@ elements.herbi_acid = { "bleach": { elem2:"digested_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, "poison": { elem2:"digested_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, "cyanide": { elem2:"digested_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, + "poison_gas": { elem2:"gaseous_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, + "cyanide_gas": { elem2:"gaseous_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, "soap": { elem2:"digested_material", attr2:{"nutrition":-20, "speed":-10}, chance:0.02 }, "mercury": { elem2:"digested_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, "chlorine": { elem2:"gaseous_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, - "pool_water": { elem2:"digested_material", attr2:{"nutrition":-400, "speed":-20}, chance:0.02 }, + "pool_water": { elem2:"digested_material", attr2:{"nutrition":-20, "speed":-20}, chance:0.02 }, "vaccine": { elem2:"digested_material", attr2:{"nutrition":1, "speed":-1, "immune":true}, chance:0.02 }, - "antidote": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1, "immune":true}, chance:0.02 }, + "antidote": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1, "poisonImmune":true}, chance:0.02 }, "coffee": { elem2:"digested_material", attr2:{"nutrition":20, "speed":10}, chance:0.02 }, "tomato": { elem2:"digested_material", attr2:{"nutrition":55}, chance:0.02 }, "grape": { elem2:"digested_material", attr2:{"nutrition":50}, chance:0.02 }, @@ -5340,16 +5941,16 @@ elements.herbi_acid = { "coffee_bean": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":20}, chance:0.02 }, "coffee_ground": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":15}, chance:0.02 }, "yeast": { elem2:"digested_material", attr2:{"nutrition":-5}, chance:0.02 }, - "alcohol": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":-15}, chance:0.02 }, + "alcohol": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":-15, "alcoholic": true}, chance:0.02 }, "honey": { elem2:"digested_material", attr2:{"nutrition":35, "speed":3}, chance:0.02 }, "blood": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":-1}, chance:0.02 }, - "excrement": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10}, chance:0.02 }, - "urine": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10}, chance:0.02 }, + "excrement": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10, "sick":true}, chance:0.02 }, + "urine": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10, "sick":true}, chance:0.02 }, "tea": { elem2:"digested_material", attr2:{"nutrition":10, "speed":10}, chance:0.02 }, - "infection": { elem2:"digested_material", attr2:{"nutrition":-20, "speed":-5}, chance:0.02 }, - "cancer": { elem2:"gaseous_material", attr2:{"nutrition":-25, "speed":-15}, chance:0.02 }, - "plague": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10}, chance:0.02 }, - "glue": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-10}, chance:0.02 }, + "infection": { elem2:"digested_material", attr2:{"nutrition":-20, "speed":-5, "sick":true}, chance:0.02 }, + "cancer": { elem2:"gaseous_material", attr2:{"nutrition":-25, "speed":-15, "sick":true}, chance:0.02 }, + "plague": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10, "sick":true}, chance:0.02 }, + "glue": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-10, "sick":true}, chance:0.02 }, }, category: "nutrition", tempHigh: 110, @@ -5367,13 +5968,13 @@ elements.carni_acid = { color: ["#ADA469","#5B6517"], behavior: [ "XX|ADB%5|XX", - "ADB%5 AND M2|DL%0.005|ADB%5 AND M2", + "ADB%5 AND M2|XX|ADB%5 AND M2", "ADB%5 AND M2|ADB%5 AND M1|ADB%5 AND M2", ], ignore: ["amphib_skin","amphib_dermis","acidic_flesh","acid_vessel","throat_lining","explosive_stomach","stomach_lining","carni_stomach","stomach_valve","slime","gaseous_material","digested_material","glass","rad_glass","glass_shard","rad_shard","stained_glass","baked_clay","acid_gas","neutral_acid","acid_cloud","water","salt_water","sugar_water","dirty_water","copper","gold","porcelain","plastic","bead","microplastic","molten_plastic","pool_water","chlorine","hydrogen","gold_coin","silver","nickel","calcium","bone","earthquake","tornado","tsunami","liquid_light","sensor"], reactions: { - "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10}, chance:0.5 }, - "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5, "speed":-2}, chance:0.02 }, + "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10, "poisonImmune":true}, chance:0.5 }, + "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5, "speed":-2, "sick":true}, chance:0.02 }, "water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":0, "speed":5}, chance:0.02 }, "salt_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, "sugar_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":10, "speed":1}, chance:0.02 }, @@ -5385,9 +5986,10 @@ elements.carni_acid = { "meat": { elem2:"digested_material", attr2:{"nutrition":70, "speed":5}, chance:0.02 }, "cooked_meat": { elem2:"digested_material", attr2:{"nutrition":60, "speed":4}, chance:0.02 }, "broth": { elem1:null, elem2:"digested_material", attr2:{"nutrition":50, "speed":6}, chance:0.02 }, - "rotten_meat": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":5, "speed":-5}, chance:0.02 }, + "rotten_meat": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":5, "speed":-5, "sick":true}, chance:0.02 }, "cured_meat": { elem2:"digested_material", attr2:{"nutrition":50, "speed":-1}, chance:0.02 }, "cheese": { elem2:"digested_material", attr2:{"nutrition":35, "speed":-1}, chance:0.02 }, + "rotten_cheese": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":-20, "speed":-5, "sick":true}, chance:0.02 }, "cheese_powder": { elem2:"digested_material", attr2:{"nutrition":35, "speed":-1}, chance:0.02 }, "lettuce": { elem2:"digested_material", attr2:{"nutrition":20}, chance:0.02 }, "herb": { elem2:"digested_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, @@ -5408,7 +6010,7 @@ elements.carni_acid = { "ant": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, "bee": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, "spider": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "rat": { elem2:"digested_material", attr2:{"nutrition":15, "speed":-5}, chance:0.02 }, + "rat": { elem2:"digested_material", attr2:{"nutrition":15, "speed":-5, "sick":true}, chance:0.02 }, "bird": { elem2:"digested_material", attr2:{"nutrition":15, "speed":1}, chance:0.02 }, "fish": { elem2:"digested_material", attr2:{"nutrition":15, "speed":1}, chance:0.02 }, "head": { elem2:"digested_material", attr2:{"nutrition":15, "speed":2}, chance:0.02 }, @@ -5416,7 +6018,7 @@ elements.carni_acid = { "flea": { elem2:"gaseous_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, "fly": { elem2:"gaseous_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, "firefly": { elem2:"gaseous_material", attr2:{"nutrition":4, "speed":-5, "poisoned":true}, chance:0.02 }, - "stinkbug": { elem2:"gaseous_material", attr2:{"nutrition":4, "speed":-5}, chance:0.02 }, + "stinkbug": { elem2:"gaseous_material", attr2:{"nutrition":4, "speed":-5, "sick":true}, chance:0.02 }, "egg": { elem2:"digested_material", attr2:{"nutrition":25, "speed":1}, chance:0.02 }, "soda": { elem2:"digested_material", attr2:{"nutrition":10, "speed":-1}, chance:0.02 }, "sap": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-1}, chance:0.02 }, @@ -5428,12 +6030,14 @@ elements.carni_acid = { "bleach": { elem2:"digested_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, "poison": { elem2:"digested_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, "cyanide": { elem2:"digested_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, + "poison_gas": { elem2:"gaseous_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, + "cyanide_gas": { elem2:"gaseous_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, "soap": { elem2:"digested_material", attr2:{"nutrition":-20, "speed":-15}, chance:0.02 }, "mercury": { elem2:"digested_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, "chlorine": { elem2:"gaseous_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, "pool_water": { elem2:"digested_material", attr2:{"nutrition":-400, "speed":-15}, chance:0.02 }, "vaccine": { elem2:"digested_material", attr2:{"nutrition":1, "speed":-1, "immune":true}, chance:0.02 }, - "antidote": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1, "immune":true}, chance:0.02 }, + "antidote": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1, "poisonImmune":true}, chance:0.02 }, "coffee": { elem2:"digested_material", attr2:{"nutrition":10, "speed":5}, chance:0.02 }, "tomato": { elem2:"digested_material", attr2:{"nutrition":25}, chance:0.02 }, "grape": { elem2:"digested_material", attr2:{"nutrition":25}, chance:0.02 }, @@ -5461,16 +6065,16 @@ elements.carni_acid = { "slush": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1}, chance:0.02 }, "coffee_bean": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":15}, chance:0.02 }, "yeast": { elem2:"gaseous_material", attr2:{"nutrition":-10}, chance:0.02 }, - "alcohol": { elem2:"digested_material", attr2:{"nutrition":"-15", "speed":-15}, chance:0.02 }, + "alcohol": { elem2:"digested_material", attr2:{"nutrition":-15, "speed":-15, "alcoholic": true}, chance:0.02 }, "honey": { elem2:"digested_material", attr2:{"nutrition":35, "speed":5}, chance:0.02 }, "blood": { elem2:"digested_material", attr2:{"nutrition":15, "speed":3}, chance:0.02 }, - "excrement": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-5}, chance:0.02 }, + "excrement": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-5, "sick":true}, chance:0.02 }, "urine": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10}, chance:0.02 }, "tea": { elem2:"digested_material", attr2:{"nutrition":5, "speed":10}, chance:0.02 }, - "infection": { elem2:"digested_material", attr2:{"nutrition":-5}, chance:0.02 }, - "cancer": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":-5}, chance:0.02 }, - "plague": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10}, chance:0.02 }, - "glue": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-15}, chance:0.02 }, + "infection": { elem2:"digested_material", attr2:{"nutrition":-5, "sick":true}, chance:0.02 }, + "cancer": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":-5, "sick":true}, chance:0.02 }, + "plague": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-10, "sick":true}, chance:0.02 }, + "glue": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-15, "sick":true}, chance:0.02 }, }, category: "nutrition", tempHigh: 110, @@ -5488,13 +6092,13 @@ elements.explosive_acid = { color: ["#E9DC8C","#D0C15A"], behavior: [ "XX|ADB%5|XX", - "ADB%5 AND M2|DL%0.005|ADB%5 AND M2", + "ADB%5 AND M2|XX|ADB%5 AND M2", "ADB%5 AND M2|ADB%5 AND M1|ADB%5 AND M2", ], ignore: ["amphib_skin","amphib_dermis","acidic_flesh","acid_vessel","throat_lining","stomach_lining","explosive_stomach","stomach_valve","slime","gaseous_material","digested_material","glass","rad_glass","glass_shard","rad_shard","stained_glass","baked_clay","acid_gas","neutral_acid","acid_cloud","water","salt_water","sugar_water","dirty_water","copper","gold","porcelain","plastic","bead","microplastic","molten_plastic","pool_water","chlorine","hydrogen","gold_coin","silver","nickel","calcium","bone","earthquake","tornado","tsunami","liquid_light","sensor"], reactions: { - "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10}, chance:0.5 }, - "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5}, chance:0.02 }, + "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10, "poisonImmune":true}, chance:0.5 }, + "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":0}, chance:0.02 }, "water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":0, "speed":10}, chance:0.02 }, "salt_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, "sugar_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, @@ -5548,12 +6152,14 @@ elements.explosive_acid = { "bleach": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, "poison": { elem2:"digested_material", attr2:{"nutrition":20}, chance:0.02 }, "cyanide": { elem2:"digested_material", attr2:{"nutrition":20}, chance:0.02 }, + "poison_gas": { elem2:"gaseous_material", attr2:{"nutrition":10}, chance:0.02 }, + "cyanide_gas": { elem2:"gaseous_material", attr2:{"nutrition":10}, chance:0.02 }, "soap": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, "mercury": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, "chlorine": { elem2:"gaseous_material", attr2:{"nutrition":5}, chance:0.02 }, "pool_water": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, "vaccine": { elem2:"digested_material", attr2:{"nutrition":1, "speed":-1, "immune":true}, chance:0.02 }, - "antidote": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1, "immune":true}, chance:0.02 }, + "antidote": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1, "poisonImmune":true}, chance:0.02 }, "coffee": { elem2:"digested_material", attr2:{"nutrition":20}, chance:0.02 }, "tomato": { elem2:"digested_material", attr2:{"nutrition":45}, chance:0.02 }, "grape": { elem2:"digested_material", attr2:{"nutrition":45}, chance:0.02 }, @@ -5582,7 +6188,7 @@ elements.explosive_acid = { "slush": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, "coffee_bean": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, "yeast": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, - "alcohol": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, + "alcohol": { elem2:"digested_material", attr2:{"nutrition":5, "alcoholic": true}, chance:0.02 }, "honey": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, "blood": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, "excrement": { elem2:"gaseous_material", attr2:{"nutrition":5}, chance:0.02 }, @@ -5607,118 +6213,6 @@ elements.explosive_acid = { isAcid: true, } -elements.decomposer_acid = { - color: ["#847C35","#6F7326"], - behavior: [ - "XX|ADB%5|XX", - "ADB%5 AND M2|DL%0.005|ADB%5 AND M2", - "ADB%5 AND M2|ADB%5 AND M1|ADB%5 AND M2", - ], - ignore: ["amphib_skin","amphib_dermis","acidic_flesh","acid_vessel","decomposer_stomach","throat_lining","explosive_stomach","herbi_stomach","carni_stomach","stomach_lining","stomach_valve","slime","gaseous_material","digested_material","glass","rad_glass","glass_shard","rad_shard","stained_glass","baked_clay","acid_gas","neutral_acid","acid_cloud","water","salt_water","sugar_water","dirty_water","copper","gold","porcelain","plastic","bead","microplastic","molten_plastic","pool_water","chlorine","hydrogen","gold_coin","silver","nickel","calcium","bone","earthquake","tornado","tsunami","liquid_light","sensor"], - reactions: { - "bless": { elem1:null, elem2:["gaseous_material",null,null,null,null,null,null,null,null,null,null], attr2:{"nutrition":100, "speed":10}, chance:0.5 }, - "dirty_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":-5}, chance:0.02 }, - "water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":0, "speed":5}, chance:0.02 }, - "salt_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, - "sugar_water": { elem1:null, elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "plant": { elem2:"digested_material", attr2:{"nutrition":40}, chance:0.02}, - "tree_branch": { elem1:null, elem2:"wood", attr2:{"nutrition":30}, chance:0.02 }, - "sugar": { elem2:"digested_material", attr2:{"nutrition":30}, chance:0.02 }, - "molasses": { elem2:"digested_material", attr2:{"nutrition":20}, chance:0.02 }, - "dead_plant": { elem2:"digested_material", attr2:{"nutrition":90, "speed":5}, chance:0.02 }, - "meat": { elem2:"digested_material", attr2:{"nutrition":20}, chance:0.02 }, - "cooked_meat": { elem2:"digested_material", attr2:{"nutrition":-5}, chance:0.02 }, - "broth": { elem1:null, elem2:"digested_material", attr2:{"nutrition":25}, chance:0.02 }, - "rotten_meat": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":55, "speed":5}, chance:0.02 }, - "cured_meat": { elem2:"digested_material", attr2:{"nutrition":-5}, chance:0.02 }, - "cheese": { elem2:"digested_material", attr2:{"nutrition":50}, chance:0.02 }, - "vine": { elem2:"digested_material", attr2:{"nutrition":30}, chance:0.02 }, - "grass": { elem2:"digested_material", attr2:{"nutrition":30}, chance:0.02 }, - "kelp": { elem2:"digested_material", attr2:{"nutrition":30}, chance:0.02 }, - "algae": { elem2:"digested_material", attr2:{"nutrition":60, "speed":5}, chance:0.02 }, - "lettuce": { elem2:"digested_material", attr2:{"nutrition":50}, chance:0.02 }, - "herb": { elem2:"digested_material", attr2:{"nutrition":50}, chance:0.02 }, - "toast": { elem2:"digested_material", attr2:{"nutrition":20}, chance:0.02 }, - "bread": { elem2:"digested_material", attr2:{"nutrition":30}, chance:0.02 }, - "hard_yolk": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "yolk": { elem2:"digested_material", attr2:{"nutrition":15}, chance:0.02 }, - "milk": { elem2:"digested_material", attr2:{"nutrition":55}, chance:0.02 }, - "crumb": { elem2:"digested_material", attr2:{"nutrition":15}, chance:0.02 }, - "pickle": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, - "salt": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "worm": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "ant": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "bee": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "spider": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "egg": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "soda": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, - "sap": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "juice": { elem2:"digested_material", attr2:{"nutrition":25}, chance:0.02 }, - "mayo": { elem2:"digested_material", attr2:{"nutrition":15}, chance:0.02 }, - "nut_butter": { elem2:"digested_material", attr2:{"nutrition":15}, chance:0.02 }, - "ketchup": { elem2:"digested_material", attr2:{"nutrition":15}, chance:0.02 }, - "jelly": { elem2:"digested_material", attr2:{"nutrition":25}, chance:0.02 }, - "bleach": { elem2:"digested_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, - "poison": { elem2:"digested_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, - "cyanide": { elem2:"digested_material", attr2:{"nutrition":-750, "speed":-20, "poisoned":true}, chance:0.02 }, - "soap": { elem2:"digested_material", attr2:{"nutrition":-20, "speed":-15}, chance:0.02 }, - "mercury": { elem2:"digested_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, - "chlorine": { elem2:"gaseous_material", attr2:{"nutrition":-500, "speed":-20, "poisoned":true}, chance:0.02 }, - "pool_water": { elem2:"digested_material", attr2:{"nutrition":-400, "speed":-15}, chance:0.02 }, - "vaccine": { elem2:"digested_material", attr2:{"nutrition":1, "speed":-1, "immune":true}, chance:0.02 }, - "antidote": { elem2:"digested_material", attr2:{"nutrition":-1, "speed":1, "immune":true}, chance:0.02 }, - "coffee": { elem2:"digested_material", attr2:{"nutrition":20, "speed":10}, chance:0.02 }, - "tomato": { elem2:"digested_material", attr2:{"nutrition":55}, chance:0.02 }, - "grape": { elem2:"digested_material", attr2:{"nutrition":40}, chance:0.02 }, - "beans": { elem2:"digested_material", attr2:{"nutrition":40}, chance:0.02 }, - "sauce": { elem2:"digested_material", attr2:{"nutrition":45}, chance:0.02 }, - "butter": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, - "melted_cheese": { elem2:"digested_material", attr2:{"nutrition":15}, chance:0.02 }, - "melted_chocolate": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "melted_butter": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, - "chocolate": { elem2:"digested_material", attr2:{"nutrition":30, "speed":1}, chance:0.02 }, - "cheese_powder": { elem2:"digested_material", attr2:{"nutrition":40}, chance:0.02 }, - "chocolate_powder": { elem2:"digested_material", attr2:{"nutrition":35, "speed":1}, chance:0.02 }, - "rice": { elem2:"digested_material", attr2:{"nutrition":45}, chance:0.02 }, - "dough": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, - "batter": { elem2:"digested_material", attr2:{"nutrition":5}, chance:0.02 }, - "baked_batter": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, - "gingerbread": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, - "ice_cream": { elem2:"digested_material", attr2:{"nutrition":30}, chance:0.02 }, - "cream": { elem2:"digested_material", attr2:{"nutrition":25}, chance:0.02 }, - "caramel": { elem2:"digested_material", attr2:{"nutrition":10}, chance:0.02 }, - "potato": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, - "baked_potato": { elem2:"digested_material", attr2:{"nutrition":45}, chance:0.02 }, - "mashed_potato": { elem2:"digested_material", attr2:{"nutrition":40}, chance:0.02 }, - "yogurt": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, - "frozen_yogurt": { elem2:"digested_material", attr2:{"nutrition":35}, chance:0.02 }, - "slush": { elem2:"digested_material", attr2:{"nutrition":0}, chance:0.02 }, - "coffee_bean": { elem2:"digested_material", attr2:{"nutrition":-5, "speed":15}, chance:0.02 }, - "yeast": { elem2:"digested_material", attr2:{"nutrition":-5}, chance:0.02 }, - "alcohol": { elem2:"digested_material", attr2:{"nutrition":-35, "speed":-5}, chance:0.02 }, - "honey": { elem2:"digested_material", attr2:{"nutrition":35, "speed":1}, chance:0.02 }, - "blood": { elem2:"digested_material", attr2:{"nutrition":5, "speed":-1}, chance:0.02 }, - "infection": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-15}, chance:0.02 }, - "cancer": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-15}, chance:0.02 }, - "plague": { elem2:"gaseous_material", attr2:{"nutrition":-15, "speed":-15}, chance:0.02 }, - "glue": { elem2:"gaseous_material", attr2:{"nutrition":-10, "speed":-15}, chance:0.02 }, - "excrement": { elem2:"digested_material", attr2:{"nutrition":25, "speed":1}, chance:0.02 }, - "urine": { elem2:"gaseous_material", attr2:{"nutrition":5, "speed":1}, chance:0.02 }, - "tea": { elem2:"digested_material", attr2:{"nutrition":10, "speed":10}, chance:0.02 }, - "dead_bug": { elem2:"digested_material", attr2:{"nutrition":35, "speed":5}, chance:0.02 }, - }, - category: "nutrition", - tempHigh: 110, - stateHigh: "acid_gas", - tempLow: -58.88, - burn: 30, - burnTime: 1, - state: "liquid", - density: 1550, - stain: -0.1, - isAcid: true, -} - elements.deoxygenated_water = { color: "#829BD4", behavior: behaviors.LIQUID, @@ -5815,6 +6309,7 @@ elements.real_bone = { burn: 1, burnTime: 100, burnInto: ["bone","bone","bone","bone","quicklime"], + desc: "Hard organism building material!" } elements.real_bone_marrow = { @@ -5914,6 +6409,7 @@ elements.real_bone_marrow = { isBio: true, renderer: renderPresets.FLESHBURN, movable: false, + desc: "Makes bones and white blood cells!" } elements.cartilage = { @@ -5954,6 +6450,7 @@ elements.cartilage = { burn: 1, burnTime: 100, burnInto: ["bone","bone","bone","bone","quicklime"], + desc: "Bones but slightly worse!" } elements.cerebrospinal_fluid = { @@ -6160,7 +6657,7 @@ elements.cerebrospinal_fluid = { }, extinguish: true, isBio: true, - renderer: renderPresets.FLESHBURN, + desc: "Liquid that doesnt die but transfers nutrients and oxygen! Part of a secret recipe." } elements.urine = { @@ -6211,7 +6708,8 @@ elements.urine = { stain: 0.01, stainSelf: true, isWaste: true, - extinguish: true + extinguish: true, + desc: "Pee." } elements.elixir = { @@ -6250,6 +6748,7 @@ elements.elixir = { density: 1450, stain: 0.05, hidden: true, + desc: "Part of a secret recipe." } elements.brain_jar_juice = { @@ -6365,7 +6864,8 @@ elements.brain_jar_juice = { immune: false, }, - extinguish: true + extinguish: true, + desc: "Made from a secret recipe with crushed fruit, cell slop and brain soup." } elements.bacteria = { @@ -6577,6 +7077,7 @@ elements.tract = { }, isBio: true, renderer: renderPresets.FLESHBURN, + desc: "Biological pipe!" } elements.biosensor = { @@ -6636,6 +7137,7 @@ elements.biosensor = { isBio: true, renderer: renderPresets.FLESHBURN, movable: false, + desc: "Biological sensor!" } elements.bioplate = { @@ -6707,6 +7209,7 @@ elements.bioplate = { isBio: true, renderer: renderPresets.FLESHBURN, movable: false, + desc: "Biological pressure plate!" } elements.biocloner = { @@ -6774,6 +7277,7 @@ elements.biocloner = { isBio: true, renderer: renderPresets.FLESHBURN, movable: false, + desc: "Biological e-cloner! Turns its oxygen and nutrients into material through bio-synthesis." } elements.valve = { @@ -6844,6 +7348,7 @@ elements.valve = { isBio: true, renderer: renderPresets.FLESHBURN, movable: false, + desc: "Power it to open, closes automatically." } elements.valve_extension = { @@ -6891,6 +7396,7 @@ elements.valve_extension = { renderer: renderPresets.FLESHBURN, movable: false, hidden: true, + desc: "Valve gate." } elements.revive = { @@ -6936,6 +7442,7 @@ elements.revive = { }, canPlace: false, category: "tools", + desc: "Secret tool. Give your allies life!" } elements.drain_health = { @@ -6962,10 +7469,70 @@ elements.drain_health = { category: "tools", } +elements.death_ray = { + color: ["#C33846","#930C00"], + tick: function(pixel) { + var x = pixel.x; + for (var y = pixel.y+1; y < height+1; y++) { + if (outOfBounds(x, y)) { + if (isEmpty(x, y-1)) { + if (Math.random() > 0.95) { + createPixel("poison_gas", x, y-1); + } + else if (Math.random() > 0.5) { + createPixel("plague", x, y-1); + } + else if (Math.random() > 0.25) { + createPixel("radiation", x, y-1); + } + else { + createPixel("foam", x, y-1); + pixelMap[x][y-1].color = "#930C00"; + } + } + break; + } + if (isEmpty(x, y)) { + if (Math.random() > 0.1) { continue } + createPixel("flash", x, y); + pixelMap[x][y].color = "#C33846"; + pixelMap[x][y].delay = (y - pixel.y) / 8; + } + else { + if (elements[pixelMap[x][y].element].id === elements.flash.id) { continue } + if (elements[pixelMap[x][y].element].id === elements.death_ray.id) { break } + if (!elements[pixelMap[x][y].element].isGas && isEmpty(x, y-1)) { + if (Math.random() > 0.95) { + createPixel("poison_gas", x, y-1); + } + else if (Math.random() > 0.95) { + createPixel("plague", x, y-1); + } + else if (Math.random() > 0.75) { + createPixel("radiation", x, y-1); + } + else { + createPixel("foam", x, y-1); + pixelMap[x][y-1].color = "#930C00"; + } + } + if (Math.random() > 0.1) { continue } + elements.drain_health.tool(pixelMap[x][y]) + } + } + deletePixel(pixel.x, pixel.y); + }, + category: "energy", + state: "gas", + density: 1, + excludeRandom: true, + noMix: true +}, + elements.toilet = { color: "#e1e4dd", behavior: behaviors.WALL, - category: "solids", + category: "machines", state: "solid", density: 2403, hardness: 0.4, @@ -6991,6 +7558,7 @@ elements.toilet = { }, canPlace: true, hidden: true, + desc: "Secret tool. Steal your enemies life!" } elements.shed_blood = { @@ -7032,14 +7600,15 @@ elements.shed_blood = { "carbon_dioxide": { elem2:null, chance:0.05 }, "alcohol": { elem1:[null,"dna"], chance:0.02 } }, - viscosity: 10, + viscosity: 20, tempHigh: 124.55, stateHigh: ["steam","salt","oxygen"], tempLow: 0, + stateLow: "blood", category:"liquids", state: "liquid", - density: 1060, - stain: 0.05 + density: 1065, + stain: 0.04, } if (!elements.cancer.reactions) { elements.cancer.reactions = {} } @@ -7077,7 +7646,6 @@ elements.cancer.reactions.digested_material = { elem2: "cancer", chance:0.001 }; elements.cancer.reactions.intestines = { elem2: "cancer", chance:0.005 }; elements.cancer.reactions.stomach_valve = { elem2: "cancer", chance:0.005 }; elements.cancer.reactions.stomach_lining = { elem2: "cancer", chance:0.005 }; -elements.cancer.reactions.decomposer_stomach = { elem2: "cancer", chance:0.004 }; elements.cancer.reactions.herbi_stomach = { elem2: "cancer", chance:0.004 }; elements.cancer.reactions.carni_stomach = { elem2: "cancer", chance:0.004 }; elements.cancer.reactions.explosive_stomach = { elem2: ["pop","cancer","cancer","cancer"], chance:0.003 }; @@ -7122,7 +7690,6 @@ elements.uranium.reactions.sphincter = { elem2: ["ash","steam","excrement","meat elements.uranium.reactions.intestines = { elem2: ["ash","steam","meat","rotten_meat","cooked_meat","flesh","ash","steam","meat","rotten_meat","cooked_meat","flesh","excrement"], chance:0.5 }; elements.uranium.reactions.stomach_valve = { elem2: ["ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 }; elements.uranium.reactions.stomach_lining = { elem2: ["ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 }; -elements.uranium.reactions.decomposer_stomach = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 }; elements.uranium.reactions.herbi_stomach = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 }; elements.uranium.reactions.carni_stomach = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 }; elements.uranium.reactions.explosive_stomach = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh","pop"], chance:0.4 }; @@ -7167,7 +7734,6 @@ elements.radiation.reactions.sphincter = { elem2: ["cancer","ash","steam","excre elements.radiation.reactions.intestines = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh","ash","steam","meat","rotten_meat","cooked_meat","flesh","excrement"], chance:0.4 }; elements.radiation.reactions.stomach_valve = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 }; elements.radiation.reactions.stomach_lining = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 }; -elements.radiation.reactions.decomposer_stomach = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 }; elements.radiation.reactions.herbi_stomach = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 }; elements.radiation.reactions.carni_stomach = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 }; elements.radiation.reactions.explosive_stomach = { elem2: ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh","pop"], chance:0.3 }; @@ -7210,7 +7776,6 @@ elements.plague.reactions.sphincter = { elem2: ["infection","rotten_meat","steam elements.plague.reactions.intestines = { elem2: ["infection","rotten_meat","steam","meat","rotten_meat","plague","flesh","rotten_meat","steam","meat","rotten_meat","plague","flesh","excrement"], chance:0.04 }; elements.plague.reactions.stomach_valve = { elem2: ["infection","rotten_meat","steam","meat","rotten_meat","plague","flesh"], chance:0.04 }; elements.plague.reactions.stomach_lining = { elem2: ["infection","rotten_meat","steam","meat","rotten_meat","plague","flesh"], chance:0.04 }; -elements.plague.reactions.decomposer_stomach = { elem2: ["infection","rotten_meat","steam","meat","rotten_meat","plague","flesh"], chance:0.04 }; elements.plague.reactions.herbi_stomach = { elem2: ["infection","rotten_meat","steam","meat","rotten_meat","plague","flesh"], chance:0.04 }; elements.plague.reactions.carni_stomach = { elem2: ["infection","rotten_meat","steam","meat","rotten_meat","plague","flesh"], chance:0.04 }; elements.plague.reactions.explosive_stomach = { elem2: ["infection","plague","steam","meat","rotten_meat","plague","flesh","pop"], chance:0.03 }; @@ -7289,9 +7854,7 @@ elements.bless.tool = function(pixel) { } } -elements.dna.reactions.juice = { elem1: null, elem2: "elixir", chance:0.01 }; - -elements.acid.ignore = ["herbi_stomach","carni_stomach","decomposer_stomach","amphib_skin","amphib_dermis","acidic_flesh","acid_vessel","explosive_stomach","stomach_valve","stomach_lining","throat_lining","glass","rad_glass","glass_shard","rad_shard","stained_glass","baked_clay","acid_gas","neutral_acid","acid_cloud","water","salt_water","sugar_water","dirty_water","copper","gold","porcelain","plastic","bead","microplastic","molten_plastic","pool_water","chlorine","hydrogen","gold_coin","silver","nickel","calcium","bone","earthquake","tornado","tsunami","liquid_light","sensor"] +elements.dna.reactions.juice = { elem1: null, elem2: "elixir", chance:0.01 } elements.dirty_water.isWaste = true; elements.salt_water.isWaste = true; @@ -7299,37 +7862,42 @@ elements.dirty_water.isWaste = true; elements.acid.isAcid = true; -elements.glass_shard.reactions.intestines = { elem2: ["blood","blood","meat"], chance:0.001 }; + +if (!elements.glass_shard.reactions) { elements.glass_shard.reactions = {} } +elements.glass_shard.reactions.intestines = { elem2: ["blood","blood","meat"], chance:0.001 } elements.glass_shard.reactions.lungs = { elem2: ["blood","blood","meat"], chance:0.001 }; -elements.glass_shard.reactions.simple_lung = { elem2:["blood","blood","meat"], chance:0.001 }; -elements.glass_shard.reactions.flesh = { elem2: ["blood","meat","meat"], chance:0.0005 }; -elements.glass_shard.reactions.blood_vessel = { elem2: ["meat","infected_vessel","blood","blood","blood","blood","blood"], chance:0.001 }; -elements.glass_shard.reactions.epidermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.0001 }; -elements.glass_shard.reactions.dermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.0001 }; +elements.glass_shard.reactions.simple_lung = { elem2:["blood","blood","meat"], chance:0.001 } +elements.glass_shard.reactions.flesh = { elem2: ["blood","meat","meat"], chance:0.0005 } +elements.glass_shard.reactions.blood_vessel = { elem2: ["meat","infected_vessel","blood","blood","blood","blood","blood"], chance:0.001 } +elements.glass_shard.reactions.epidermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.0001 } +elements.glass_shard.reactions.dermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.0001 } -elements.rad_shard.reactions.intestines = { elem2: ["blood","blood","meat"], chance:0.001 }; -elements.rad_shard.reactions.lungs = { elem2: ["blood","blood","meat"], chance:0.001 }; -elements.rad_shard.reactions.simple_lung = { elem2:["blood","blood","meat"], chance:0.001 }; -elements.rad_shard.reactions.flesh = { elem2: ["blood","meat","meat"], chance:0.0005 }; -elements.rad_shard.reactions.blood_vessel = { elem2: ["meat","infected_vessel","blood","blood","blood","blood","blood"], chance:0.001 }; -elements.rad_shard.reactions.epidermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.0001 }; -elements.rad_shard.reactions.dermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.0001 }; +if (!elements.rad_shard.reactions) { elements.rad_shard.reactions = {} } +elements.rad_shard.reactions.intestines = { elem2: ["blood","blood","meat"], chance:0.001 } +elements.rad_shard.reactions.lungs = { elem2: ["blood","blood","meat"], chance:0.001 } +elements.rad_shard.reactions.simple_lung = { elem2:["blood","blood","meat"], chance:0.001 } +elements.rad_shard.reactions.flesh = { elem2: ["blood","meat","meat"], chance:0.0005 } +elements.rad_shard.reactions.blood_vessel = { elem2: ["meat","infected_vessel","blood","blood","blood","blood","blood"], chance:0.001 } +elements.rad_shard.reactions.epidermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.0001 } +elements.rad_shard.reactions.dermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.0001 } -elements.porcelain_shard.reactions.intestines = { elem2: ["blood","blood","meat"], chance:0.0005 }; -elements.porcelain_shard.reactions.lungs = { elem2: ["blood","blood","meat"], chance:0.0005 }; -elements.porcelain_shard.reactions.simple_lung = { elem2:["blood","blood","meat"], chance:0.0005 }; -elements.porcelain_shard.reactions.flesh = { elem2: ["blood","meat","meat"], chance:0.0001 }; -elements.porcelain_shard.reactions.blood_vessel = { elem2: ["meat","infected_vessel","blood","blood","blood","blood","blood"], chance:0.0005 }; -elements.porcelain_shard.reactions.epidermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.00005 }; -elements.porcelain_shard.reactions.dermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.00005 }; +if (!elements.porcelain_shard.reactions) { elements.porcelain_shard.reactions = {} } +elements.porcelain_shard.reactions.intestines = { elem2: ["blood","blood","meat"], chance:0.0005 } +elements.porcelain_shard.reactions.lungs = { elem2: ["blood","blood","meat"], chance:0.0005 } +elements.porcelain_shard.reactions.simple_lung = { elem2:["blood","blood","meat"], chance:0.0005 } +elements.porcelain_shard.reactions.flesh = { elem2: ["blood","meat","meat"], chance:0.0001 } +elements.porcelain_shard.reactions.blood_vessel = { elem2: ["meat","infected_vessel","blood","blood","blood","blood","blood"], chance:0.0005 } +elements.porcelain_shard.reactions.epidermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.00005 } +elements.porcelain_shard.reactions.dermis = { elem2: ["dust","blood","blood","blood","blood","blood"], chance:0.00005 } -elements.metal_scrap.reactions.intestines = { elem2: ["blood","meat"], chance:0.0005 }; -elements.metal_scrap.reactions.lungs = { elem2: ["blood","meat"], chance:0.0005 }; -elements.metal_scrap.reactions.simple_lung = { elem2:["blood","meat"], chance:0.0005 }; -elements.metal_scrap.reactions.flesh = { elem2: ["blood","meat","meat"], chance:0.0001 }; -elements.metal_scrap.reactions.blood_vessel = { elem2: ["meat","infected_vessel","blood","blood","blood","blood"], chance:0.0005 }; +if (!elements.metal_scrap.reactions) { elements.metal_scrap.reactions = {} } +elements.metal_scrap.reactions.intestines = { elem2: ["blood","meat"], chance:0.0005 } +elements.metal_scrap.reactions.lungs = { elem2: ["blood","meat"], chance:0.0005 } +elements.metal_scrap.reactions.simple_lung = { elem2:["blood","meat"], chance:0.0005 } +elements.metal_scrap.reactions.flesh = { elem2: ["blood","meat","meat"], chance:0.0001 } +elements.metal_scrap.reactions.blood_vessel = { elem2: ["meat","infected_vessel","blood","blood","blood","blood"], chance:0.0005 } -elements.vaccine.reactions.infected_vessel = { elem1: null, elem2: "blood_vessel", attr2:{"immune": true}, chance:0.02 }; -elements.antidote.reactions.infected_vessel = { elem1: null, elem2: "blood_vessel", attr2:{"immune": true}, chance:0.02 }; +elements.vaccine.reactions.infected_vessel = { elem1: null, elem2: "blood_vessel", attr2:{"immune": true}, chance:0.02 } +elements.antidote.reactions.infected_vessel = { elem1: null, elem2: "blood_vessel", attr2:{"immune": true}, chance:0.02 } elements.salt_water.stateHigh = ["steam","steam","salt"] From c145280fce9c60e2123acd04f2c80c523b8e9b6f Mon Sep 17 00:00:00 2001 From: Phi Date: Tue, 11 Feb 2025 16:00:20 +0000 Subject: [PATCH 03/34] 16.9. --- mods/mars.js | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/mods/mars.js b/mods/mars.js index ca4fe635..7ca454e3 100644 --- a/mods/mars.js +++ b/mods/mars.js @@ -17,7 +17,9 @@ elements.mars_dust = { stateHigh: "molten_mars", tempLow: -170, stateLow: "mars_rock", - extraInfo: "Dust Samples from mars. Can freeze into Mars Rock." + extraInfo: "Dust Samples from mars. Can freeze into Mars Rock.", + hardness: 0.991, + breakInto: "mars_debris" } elements.molten_mars = { color: "#ffc338", @@ -42,6 +44,13 @@ elements.mars_rock = { stateLow: "mars_rock_wall", extraInfo: "The Freezing of Mars Dust. Can be used for normal land." } +elements.mars_debris = { + color: "#ff9999", + behavior: behaviors.STURDYPOWDER, + category: "mars", + state: "solid", + density: 1605 +} elements.support_mars_rock = { color: ["#a51002","#bd1102"], behavior: behaviors.SUPPORTPOWDER, @@ -106,14 +115,20 @@ elements.mars_furnace = { state: "solid", hardness: 0.6, stateHigh: "molten_mars", - extraInfo: "Used to turn Ironheart into Ironheart Solids" + extraInfo: "Used to turn Ironheart into Ironheart Solids", + tempHigh: "550", + stateHigh: "molten_mars", + breakInto: ["ironheart", "mars_ironheart", "ironheart_ore", "gunk"] } elements.nosmoker = { color: ["#870002", "#870507"], behavior: behaviors.WALL, category: "mars", state: "solid", - extraInfo: "Used to turn Ironheart into Ironheart Solids" + extraInfo: "Used to turn Ironheart into Ironheart Solids", + tempHigh: "350", + stateHigh: "molten_mars", + breakInto: ["ironheart", "mars_ironheart", "ironheart_ore", "antigunk"] } elements.ironheart = { color: "#e9825a", @@ -197,9 +212,12 @@ elements.o2_tank = { ], category: "mars", state: "solid", - + tempHigh: "600", + stateHigh: "molten_copper", + breakInto: ["copper", "oxygen"] } -// 1.4.7 + +// 1.6.9 // most elements done :D // iron heart ore // iron heart @@ -215,3 +233,7 @@ elements.o2_tank = { // im putting in the archive // lil changes // inroducing oxygen tanks! +// machines are smashable. please smash them. +// also heatable +// O2 BE YOU +// rover From d3f8b3e8ca889e9d673e1e7ea12d34a3bc76a29f Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Tue, 11 Feb 2025 14:44:24 -0500 Subject: [PATCH 04/34] Rename mjsstuff to mjsstuff.js --- mods/{mjsstuff => mjsstuff.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mods/{mjsstuff => mjsstuff.js} (100%) diff --git a/mods/mjsstuff b/mods/mjsstuff.js similarity index 100% rename from mods/mjsstuff rename to mods/mjsstuff.js From e9a7de2b73452ca9f83a9b3441316c4470f6aa94 Mon Sep 17 00:00:00 2001 From: NM-Lolbit <104076086+NM-Lolbit@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:38:51 +0000 Subject: [PATCH 05/34] Update mjsstuff.js ill make different type of caramel but im a lazy a*s and i have math homework to do so this is all im doing for now and it already took like 30 min or more to do --- mods/mjsstuff.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mods/mjsstuff.js b/mods/mjsstuff.js index e0605514..af540934 100644 --- a/mods/mjsstuff.js +++ b/mods/mjsstuff.js @@ -70,6 +70,7 @@ elements.dark_brown_sugar = { behavior: behaviors.SUPPORTPOWDER, category: "food", state: "powder", + stateHigh: "caramel", //am i an idiot for taking this long to figure out how to edit my code? yes. i am. reactions: { "water": { elem1: "sugar_water", elem2: null }, } @@ -81,6 +82,7 @@ elements.icing_sugar = { behavior: behaviors.SUPPORTPOWDER, category: "food", state: "powder", + stateHigh: "caramel", reactions: { "water": { elem1: null , elem2: "icing" }, } @@ -92,6 +94,7 @@ elements.golden_caster_sugar = { behavior: behaviors.POWDER, category: "food", state: "powder", + stateHigh: "caramel", reactions: { "water": { elem1: "sugar_water" , elem2: null }, } @@ -104,6 +107,7 @@ elements.caster_sugar = { behavior: behaviors.POWDER, category: "food", state: "powder", + stateHigh: "caramel", reactions: { "water": { elem1: "sugar_water" , elem2: null }, } @@ -114,6 +118,7 @@ elements.light_brown_sugar = { behavior: behaviors.SUPPORTPOWDER, category: "food", state: "powder", + stateHigh: "caramel", reactions: { "water": { elem1: "sugar_water" , elem2: null }, } @@ -125,6 +130,7 @@ elements.demerara_sugar = { behavior: behaviors.POWDER, category: "food", state: "powder", + stateHigh: "caramel", reactions: { "water": { elem1: "sugar_water" , elem2: null }, } @@ -136,6 +142,7 @@ elements.dark_muscovado_sugar = { behavior: behaviors.SUPPORTPOWDER, category: "food", state: "powder", + stateHigh: "caramel", reactions: { "water": { elem1: "sugar_water" , elem2: null }, } @@ -148,6 +155,7 @@ elements.granulated_sugar = { behavior: behaviors.POWDER, category: "food", state: "powder", + stateHigh: "caramel", reactions: { "water": { elem1: "sugar_water" , elem2: null }, } @@ -159,6 +167,7 @@ elements.icing = { behavior: behaviors.LIQUID, category: "food", state: "powder", + stateHigh: "caramel", viscosity: 2000, From 64934794012d528428247b9843471a8bcc320e3a Mon Sep 17 00:00:00 2001 From: NM-Lolbit <104076086+NM-Lolbit@users.noreply.github.com> Date: Tue, 11 Feb 2025 21:40:29 +0000 Subject: [PATCH 06/34] Update mjsstuff.js i added more stupid elements if i messed anything up imma cry myself to sleep/(joke) --- mods/mjsstuff.js | 63 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/mods/mjsstuff.js b/mods/mjsstuff.js index e0605514..b2c37771 100644 --- a/mods/mjsstuff.js +++ b/mods/mjsstuff.js @@ -160,6 +160,65 @@ elements.icing = { category: "food", state: "powder", viscosity: 2000, - - }; + + +elements.Hazel = { + color: ["#189BCC",], + behavior: behaviors.SUPERFLUID, + category: "joke", + state: "liquid", + viscosity: 0, +}; + + elements.guhguhgugu = { + color: ["#a73acf", "#9e26c9", "#be5ee0",], + behavior: behaviors.LIQUID, + category: "joke", + state: "liquid", + stateLow: "frozen_guhguhgugu", + tempLow: -150, + stateHigh: "solid_guhguhgugu", + tempHigh: 150, + }; + + elements.solid_guhguhgugu = { + color: ["#a73acf", "#9e26c9", "#be5ee0",], + behavior: behaviors.SOLID, + category: "joke", + state: "solid", + stateLow: "guhguhgugu", + tempLow: 150, + stateHigh: "liquid_guhguhgugu", + tempHigh: 250, + }; + + elements.liquid_guhguhgugu = { + color: ["#a73acf", "#9e26c9", "#be5ee0",], + behavior: behaviors.MOLTEN, + category: "molten", + state: "molten", + tempLow: "250", + stateLow: "solid_guhguhgugu", + stateHigh: "liquid_guhguhgugu", + tempHigh: 500, + }; + + elements.boil_guhguhgugu = { + color: ["#a73acf", "#9e26c9", "#be5ee0",], + behavior: behaviors.DGAS, + category: "joke", + state: "gas", + tempLow: "500", + stateLow: "liquid_guhguhgugu", + + }; + +elements.frozen_guhguhgugu = { + color: ["#a73acf", "#9e26c9", "#be5ee0",], + behavior: behaviors.SOLID, + category: "joke", + state: "solid", + stateHigh: "guhguhgugu", + tempHigh: 15, + }; From ed76d8c70926d9ec47eee2776f9029572af2a4cf Mon Sep 17 00:00:00 2001 From: Nekonico <163950752+DBNekonico@users.noreply.github.com> Date: Sat, 15 Feb 2025 00:06:54 -0800 Subject: [PATCH 07/34] better nutrition and oxygen distribution --- mods/biology.js | 285 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 227 insertions(+), 58 deletions(-) diff --git a/mods/biology.js b/mods/biology.js index 646c1961..2f94e9c6 100644 --- a/mods/biology.js +++ b/mods/biology.js @@ -180,7 +180,7 @@ behaviorRules.ADB = function() { }, doBioNorm = function(pixel) { -if ((Math.random() > 0.92 && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() < (pixel.alcoDepri / 100) && pixel.alcoholic === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.60 && pixel.sick === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.5 && pixel.poisoned === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.burning === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp > 53 && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp < -10 && pixel.nutrition > 0 && pixel.oxygen > 0) || Math.random() > 0.85 && Math.random() < (pixel.burnt / 100)) { +if ((Math.random() > 0.92 && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() < (pixel.fentDepri / 100) && pixel.fenAddict === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() < (pixel.alcoDepri / 100) && pixel.alcoholic === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.60 && pixel.sick === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (Math.random() > 0.5 && pixel.poisoned === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.burning === true && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp > 53 && pixel.nutrition > 0 && pixel.oxygen > 0) || (pixel.temp < -10 && pixel.nutrition > 0 && pixel.oxygen > 0) || Math.random() > 0.85 && Math.random() < (pixel.burnt / 100)) { pixel.nutrition -= 0.5 pixel.oxygen-- } @@ -238,6 +238,13 @@ if (pixel.alcoTime < (pixelTicks - 10000) && pixel.alcoholic === true && Math.ra pixel.alcoholic = false pixel.alcoRecover = true } +if ((pixel.fentDepri || pixel.fentDepri === 0) && pixel.fenAddict === true) { + pixel.fentDepri += 1 +} +if (pixel.poisonImmune === true) { + pixel.fentDepri = undefined + pixel.fenAddict = false +} if (pixel.poisonImmune === true && pixel.poisoned != false) { pixel.poisoned = false } @@ -292,6 +299,9 @@ if (!isEmpty(pixel.x, pixel.y-1, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } @@ -331,6 +341,18 @@ if (!isEmpty(pixel.x, pixel.y+1, true)) { hitPixel.speed += 1 pixel.speed -= 1 } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { hitPixel.alcoholic = true hitPixel.alcoTime = pixel.alcoTime @@ -345,17 +367,8 @@ if (!isEmpty(pixel.x, pixel.y+1, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } - if (hitPixel.oxygen > pixel.oxygen) { - hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) - pixel.oxygen += (elements[hitPixel.element].oxygTrans) - } - if (hitPixel.nutrition > pixel.nutrition) { - hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) - pixel.nutrition += (elements[hitPixel.element].nutrTrans) - } - if (hitPixel.speed > pixel.speed) { - hitPixel.speed -= 1 - pixel.speed += 1 + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri } if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true @@ -367,7 +380,6 @@ if (!isEmpty(pixel.x, pixel.y+1, true)) { hitPixel.poisoned = true } if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { - hitPixel.poisoned = false hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -397,6 +409,18 @@ if (!isEmpty(pixel.x-1, pixel.y, true)) { hitPixel.speed += 1 pixel.speed -= 1 } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { hitPixel.alcoholic = true hitPixel.alcoTime = pixel.alcoTime @@ -411,17 +435,8 @@ if (!isEmpty(pixel.x-1, pixel.y, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } - if (hitPixel.oxygen > pixel.oxygen) { - hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) - pixel.oxygen += (elements[hitPixel.element].oxygTrans) - } - if (hitPixel.nutrition > pixel.nutrition) { - hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) - pixel.nutrition += (elements[hitPixel.element].nutrTrans) - } - if (hitPixel.speed > pixel.speed) { - hitPixel.speed -= 1 - pixel.speed += 1 + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri } if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true @@ -433,7 +448,6 @@ if (!isEmpty(pixel.x-1, pixel.y, true)) { hitPixel.poisoned = true } if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { - hitPixel.poisoned = false hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -489,6 +503,9 @@ if (!isEmpty(pixel.x+1, pixel.y, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } @@ -499,7 +516,6 @@ if (!isEmpty(pixel.x+1, pixel.y, true)) { hitPixel.poisoned = true } if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { - hitPixel.poisoned = false hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -615,6 +631,9 @@ if (!isEmpty(pixel.x, pixel.y-1, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } @@ -694,6 +713,9 @@ if (!isEmpty(pixel.x, pixel.y+1, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } @@ -773,6 +795,9 @@ if (!isEmpty(pixel.x-1, pixel.y, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } @@ -852,6 +877,9 @@ if (!isEmpty(pixel.x+1, pixel.y, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } @@ -976,13 +1004,25 @@ if (!isEmpty(pixel.x, pixel.y-1, true)) { pixel.oxygen -= (elements[pixel.element].oxygTrans) } if (hitPixel.nutrition < pixel.nutrition) { - hitPixel.nutrition += elements[pixel.element].nutrTrans - pixel.nutrition -= elements[pixel.element].nutrTrans + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) } if (hitPixel.speed < pixel.speed) { hitPixel.speed += 1 pixel.speed -= 1 } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { hitPixel.alcoholic = true hitPixel.alcoTime = pixel.alcoTime @@ -997,16 +1037,19 @@ if (!isEmpty(pixel.x, pixel.y-1, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } - if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.85) { + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } - if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.65) { + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { hitPixel.poisonImmune = true } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.85) { + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { hitPixel.poisoned = true } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.65) { + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -1025,13 +1068,25 @@ if (!isEmpty(pixel.x, pixel.y+1, true)) { pixel.oxygen -= (elements[pixel.element].oxygTrans) } if (hitPixel.nutrition < pixel.nutrition) { - hitPixel.nutrition += elements[pixel.element].nutrTrans - pixel.nutrition -= elements[pixel.element].nutrTrans + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) } if (hitPixel.speed < pixel.speed) { hitPixel.speed += 1 pixel.speed -= 1 } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { hitPixel.alcoholic = true hitPixel.alcoTime = pixel.alcoTime @@ -1046,16 +1101,19 @@ if (!isEmpty(pixel.x, pixel.y+1, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } - if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.85) { + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } - if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.65) { + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { hitPixel.poisonImmune = true } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.85) { + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { hitPixel.poisoned = true } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.65) { + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -1074,13 +1132,25 @@ if (!isEmpty(pixel.x-1, pixel.y, true)) { pixel.oxygen -= (elements[pixel.element].oxygTrans) } if (hitPixel.nutrition < pixel.nutrition) { - hitPixel.nutrition += elements[pixel.element].nutrTrans - pixel.nutrition -= elements[pixel.element].nutrTrans + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) } if (hitPixel.speed < pixel.speed) { hitPixel.speed += 1 pixel.speed -= 1 } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { hitPixel.alcoholic = true hitPixel.alcoTime = pixel.alcoTime @@ -1095,16 +1165,19 @@ if (!isEmpty(pixel.x-1, pixel.y, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } - if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.85) { + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } - if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.65) { + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { hitPixel.poisonImmune = true } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.85) { + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { hitPixel.poisoned = true } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.65) { + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -1123,13 +1196,25 @@ if (!isEmpty(pixel.x+1, pixel.y, true)) { pixel.oxygen -= (elements[pixel.element].oxygTrans) } if (hitPixel.nutrition < pixel.nutrition) { - hitPixel.nutrition += elements[pixel.element].nutrTrans - pixel.nutrition -= elements[pixel.element].nutrTrans + hitPixel.nutrition += (elements[pixel.element].nutrTrans) + pixel.nutrition -= (elements[pixel.element].nutrTrans) } if (hitPixel.speed < pixel.speed) { hitPixel.speed += 1 pixel.speed -= 1 } + if (hitPixel.oxygen > pixel.oxygen) { + hitPixel.oxygen -= (elements[hitPixel.element].oxygTrans) + pixel.oxygen += (elements[hitPixel.element].oxygTrans) + } + if (hitPixel.nutrition > pixel.nutrition) { + hitPixel.nutrition -= (elements[hitPixel.element].nutrTrans) + pixel.nutrition += (elements[hitPixel.element].nutrTrans) + } + if (hitPixel.speed > pixel.speed) { + hitPixel.speed -= 1 + pixel.speed += 1 + } if (hitPixel.alcoholic !== true && pixel.alcoholic === true && Math.random() > 0.85) { hitPixel.alcoholic = true hitPixel.alcoTime = pixel.alcoTime @@ -1144,16 +1229,19 @@ if (!isEmpty(pixel.x+1, pixel.y, true)) { if (hitPixel.alcoRecover !== true && pixel.alcoRecover) { hitPixel.alcoRecover = true } - if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.85) { + if (hitPixel.fentDepri < pixel.fentDepri && pixel.fentDepri) { + hitPixel.fentDepri = pixel.fentDepri + } + if (hitPixel.sick != true && pixel.sick == true && Math.random() > 0.95) { hitPixel.sick = true } - if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.65) { + if (hitPixel.poisonImmune != true && pixel.poisonImmune == true && Math.random() > 0.75) { hitPixel.poisonImmune = true } - if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.85) { + if (hitPixel.poisoned != true && pixel.poisoned == true && Math.random() > 0.95) { hitPixel.poisoned = true } - if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.65) { + if (hitPixel.immune != true && pixel.immune == true && Math.random() > 0.75) { hitPixel.immune = true } if (hitPixel.burnt > 0 && (!pixel.burnt || pixel.burnt < hitPixel.burnt && pixel.burnt < 51) && Math.random() > 0.8) { @@ -1243,9 +1331,12 @@ elements.epidermis = { } } } - if (pixel.temp < 36 && Math.random() < 0.1) { + if (pixel.temp < 36.5 && Math.random() < 0.1) { pixel.temp += 1; } + else if (pixel.temp > 37 && Math.random() < 0.1) { + pixel.temp -= 1; + } doBioNorm(pixel); doDefaults(pixel); }, @@ -1370,9 +1461,12 @@ elements.cloak_skin = { } } } - if (pixel.temp < 36 && Math.random() < 0.1) { + if (pixel.temp < 36.5 && Math.random() < 0.1) { pixel.temp += 1; } + else if (pixel.temp > 37 && Math.random() < 0.1) { + pixel.temp -= 1; + } if (!isEmpty(pixel.x, pixel.y-1, true)) { var hitPixel = pixelMap[pixel.x][pixel.y-1] if (elements[hitPixel.element].movable) { @@ -1680,10 +1774,10 @@ elements.attached_hair = { category: "structural", behavior: behaviors.WALL, tick: function(pixel) { - if (Math.random() < 0.005) { + if (Math.random() < 0.001) { if (pixel.dir === "up") { if (isEmpty(pixel.x,pixel.y-1)) { - if (Math.random() > 0.2) { + if (Math.random() > 0.25) { createPixel("attached_hair",pixel.x,pixel.y-1) pixelMap[pixel.x][pixel.y-1].dir = "up" } @@ -1695,7 +1789,7 @@ elements.attached_hair = { } else if (pixel.dir === "down") { if (isEmpty(pixel.x,pixel.y+1)) { - if (Math.random() > 0.2) { + if (Math.random() > 0.25) { createPixel("attached_hair",pixel.x,pixel.y+1) pixelMap[pixel.x][pixel.y+1].dir = "down" } @@ -1707,7 +1801,7 @@ elements.attached_hair = { } else if (pixel.dir === "left") { if (isEmpty(pixel.x-1,pixel.y)) { - if (Math.random() > 0.2) { + if (Math.random() > 0.25) { createPixel("attached_hair",pixel.x-1,pixel.y) pixelMap[pixel.x-1][pixel.y].dir = "left" } @@ -1719,7 +1813,7 @@ elements.attached_hair = { } else if (pixel.dir === "right") { if (isEmpty(pixel.x+1,pixel.y)) { - if (Math.random() > 0.2) { + if (Math.random() > 0.25) { createPixel("attached_hair",pixel.x+1,pixel.y) pixelMap[pixel.x+1][pixel.y].dir = "right" } @@ -1866,9 +1960,12 @@ elements.hairy_skin = { } } } - if (pixel.temp < 36 && Math.random() < 0.1) { + if (pixel.temp < 36.5 && Math.random() < 0.1) { pixel.temp += 1; } + else if (pixel.temp > 37 && Math.random() < 0.1) { + pixel.temp -= 1; + } doDefaults(pixel); doBioNorm(pixel); }, @@ -3890,6 +3987,15 @@ elements.intestines = { pixel.alcoDepri = 0 } } + if (hitPixel.fent === true && Math.random() > 0.5) { + if (pixel.fentDepri) { + pixel.fentDepri = 0 + } + if (Math.random() > 0.5) { + pixel.fenAddict = true + pixel.fentDepri = 0 + } + } if (hitPixel.poisonImmune === true && Math.random() > 0.5) { pixel.poisoned = false pixel.sick = false @@ -3923,6 +4029,15 @@ elements.intestines = { pixel.alcoDepri = 0 } } + if (hitPixel.fent === true && Math.random() > 0.5) { + if (pixel.fentDepri) { + pixel.fentDepri = 0 + } + if (Math.random() > 0.5) { + pixel.fenAddict = true + pixel.fentDepri = 0 + } + } if (hitPixel.alcoholic === true && Math.random() > 0.95) { pixel.alcoholic = true pixel.alcoTime = pixelTicks @@ -3969,6 +4084,15 @@ elements.intestines = { pixel.alcoDepri = 0 } } + if (hitPixel.fent === true && Math.random() > 0.5) { + if (pixel.fentDepri) { + pixel.fentDepri = 0 + } + if (Math.random() > 0.5) { + pixel.fenAddict = true + pixel.fentDepri = 0 + } + } if (hitPixel.alcoholic === true && Math.random() > 0.95) { pixel.alcoholic = true pixel.alcoTime = pixelTicks @@ -4007,6 +4131,15 @@ elements.intestines = { pixel.alcoDepri = 0 } } + if (hitPixel.fent === true && Math.random() > 0.5) { + if (pixel.fentDepri) { + pixel.fentDepri = 0 + } + if (Math.random() > 0.5) { + pixel.fenAddict = true + pixel.fentDepri = 0 + } + } if (hitPixel.alcoholic === true && Math.random() > 0.95) { pixel.alcoholic = true pixel.alcoTime = pixelTicks @@ -4053,6 +4186,15 @@ elements.intestines = { pixel.alcoDepri = 0 } } + if (hitPixel.fent === true && Math.random() > 0.5) { + if (pixel.fentDepri) { + pixel.fentDepri = 0 + } + if (Math.random() > 0.5) { + pixel.fenAddict = true + pixel.fentDepri = 0 + } + } if (hitPixel.alcoholic === true && Math.random() > 0.95) { pixel.alcoholic = true pixel.alcoTime = pixelTicks @@ -4089,6 +4231,15 @@ elements.intestines = { pixel.alcoDepri = 0 } } + if (hitPixel.fent === true && Math.random() > 0.5) { + if (pixel.fentDepri) { + pixel.fentDepri = 0 + } + if (Math.random() > 0.5) { + pixel.fenAddict = true + pixel.fentDepri = 0 + } + } if (hitPixel.alcoholic === true && Math.random() > 0.95) { pixel.alcoholic = true pixel.alcoTime = pixelTicks @@ -4135,6 +4286,15 @@ elements.intestines = { pixel.alcoDepri = 0 } } + if (hitPixel.fent === true && Math.random() > 0.5) { + if (pixel.fentDepri) { + pixel.fentDepri = 0 + } + if (Math.random() > 0.5) { + pixel.fenAddict = true + pixel.fentDepri = 0 + } + } if (hitPixel.alcoholic === true && Math.random() > 0.95) { pixel.alcoholic = true pixel.alcoTime = pixelTicks @@ -4173,6 +4333,15 @@ elements.intestines = { pixel.alcoDepri = 0 } } + if (hitPixel.fent === true && Math.random() > 0.5) { + if (pixel.fentDepri) { + pixel.fentDepri = 0 + } + if (Math.random() > 0.5) { + pixel.fenAddict = true + pixel.fentDepri = 0 + } + } if (hitPixel.alcoholic === true && Math.random() > 0.95) { pixel.alcoholic = true pixel.alcoTime = pixelTicks From f33ff01e9d26e8270870cf4a6dfac483290473ec Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sat, 15 Feb 2025 14:43:09 -0500 Subject: [PATCH 08/34] Create README.txt --- lang/README.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lang/README.txt diff --git a/lang/README.txt b/lang/README.txt new file mode 100644 index 00000000..085b1bb6 --- /dev/null +++ b/lang/README.txt @@ -0,0 +1,5 @@ +Translation updates to this GitHub repo are no longer accepted! + +If you'd like to contribute translations, you must use the new Crowdin system here: https://crowdin.com/editor/sandboxels + +For more information, see the Translation Page: https://sandboxels.r74n.com/translate From ca93d5be95aeb8b57b3184bf490124caef358fab Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Sat, 15 Feb 2025 20:01:23 -0500 Subject: [PATCH 09/34] not a'aa --- mods/a_mod_by_alice.js | 70 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 4086ae75..0805f486 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -5759,6 +5759,38 @@ color1 and color2 spread through striped paint like dye does with itself. col } clearInterval(renderInterval); renderInterval = window.setInterval(drawLayers, 1000/60); + viewInfo[4] = { + name: 'element', + pixel: function(pixel,ctx) { + var data = elements[pixel.element]; + var _color = data.color; + if(Array.isArray(_color)) { + _color = _color[Math.floor(pixelTicks / 6) % _color.length] + }; + drawSquare(ctx,_color,pixel.x,pixel.y,undefined,1 - (data.alpha ?? 0)) + } + }; + viewInfo[5] = { + name: 'velocity', + pixel: function(pixel,ctx) { + var data = elements[pixel.element]; + var vx = pixel.vx ?? 0; + var vy = pixel.vy ?? 0; + var _color = null; + if(vx === 0 && vy === 0) { + _color = "rgb(15,15,15)" + } else { + var magnitude = Math.sqrt ((vx ** 2) + (vy ** 2)); + var direction = Math.atan2(pixel.vy ?? 0,pixel.vx ?? 0)*180/Math.PI; + if(direction < 0) { direction = scale(direction,-180,0,360,180) }; + hue = direction; + sat = 100; + lig = bound(scale(magnitude,0,100,10,100),0,100); + _color = "hsl("+hue+","+sat+"%,"+lig+"%)"; + }; + drawSquare(ctx,_color,pixel.x,pixel.y,undefined,1 - (data.alpha ?? 0)) + } + }; canvasLayers.pressure = document.createElement("canvas"); canvasLayersPre.push(canvasLayers.pressure); function drawPressure() { @@ -11735,6 +11767,7 @@ color1 and color2 spread through striped paint like dye does with itself. col }; elements.planet_cracker = { color: "#ffc8ba", + excludeRandom: true, behavior: behaviors.WALL, properties: { active: true, @@ -15232,6 +15265,7 @@ Pixel size (rendering only): (Use if the save looks cut o }; elements.light_petroleum_fuel_gas = { //it's not liquified, and sandboxels doesn't even have a pressure system, and there is no generic name for uncompressed, gaseous "L"PG, so we need a different name burn: 100, + burnTime: 10, color: "#b5b5b3", density: 3.5, tempLow: -44, @@ -15241,10 +15275,17 @@ Pixel size (rendering only): (Use if the save looks cut o pixel.burnStart = pixelTicks; } }, - burnInto: "explosion,explosion,fire,fire,fire,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","), + burnInto: "explosion,explosion,ignited_gas,fire,fire,fire,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","), state: "gas", behavior: behaviors.GAS, }; + elements.liquid_light_petroleum_fuel = { + burn: 50, + burnTime: 165, + fireElement: ["light_petroleum_fuel_gas","fire","fire"], + burnInto: "ignited_gas,fire,fire,smoke,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","), + tempLow: -180 //based off of ethane + } elements.lamp_oil.tempHigh = 170; elements.lamp_oil.stateHigh = "lamp_oil_gas"; elements.lamp_oil.density = 810; @@ -21561,7 +21602,7 @@ Pixel size (rendering only): (Use if the save looks cut o elements[name] = { behavior: itsActuallySolidNotPowderLol ? behaviors.WALL : behaviors.POWDER, color: color, - category: "solids", + category: itsActuallySolidNotPowderLol ? "solids" : "powders", state: "solid", density: density ?? 1000, }; @@ -25916,7 +25957,6 @@ Pixel size (rendering only): (Use if the save looks cut o goldenZirconColors = ["#e99209","#fcb111","#d88208","#b97605"]; //heatTreated 0 = untreated, 1 = inertly (blue), 2 = with oxygen (golden) elements.zircon = { - //Corundum with different impurities, so I can copy/paste everything but the color color: ["#37130b","#a9301a","#3c1810"], properties: { heatTreated: 0 @@ -27959,9 +27999,16 @@ ${eightSpaces}Example full decor definition: bird:0.04:10:#FF0000,#FFFF00,#00FF0 console.error("pixelsize: supplied pixel size was zero or negative"); return false; } else { - document.querySelector('span[setting="pixelsize"]').querySelector("select").selectedIndex = pixelSizeSettingDropdownOtherOptionIndex; - settings.pixelsize = argPixelSize; - resizeCanvas(ctx.canvas.height,ctx.canvas.width,settings.pixelsize,false) + var confirmation = confirm("Due to changes in the game, this command must reset the canvas. Proceed?") + if(confirmation) { + document.querySelector('span[setting="pixelsize"]').querySelector("select").selectedIndex = pixelSizeSettingDropdownOtherOptionIndex; + settings.pixelsize = argPixelSize; + resizeCanvas(ctx.canvas.height,ctx.canvas.width,settings.pixelsize,false); + clearAll(); + return argPixelSize + } else { + return false + } }; } else { alert(pixelSize); @@ -28733,7 +28780,8 @@ Make sure to save your command in a file if you want to add this preset again.` elements.smash_ray = { color: ["#ff9999", "#8c8279"], tick: function(pixel) { - if(pixel.done) { deletePixel(pixel); return }; + if(!pixel) { return }; + if(pixel?.done) { deletePixel(pixel.x,pixel.y); return }; var x = pixel.x; for (var y = pixel.y; y < height; y++) { if (outOfBounds(x, y)) { @@ -35763,6 +35811,7 @@ Make sure to save your command in a file if you want to add this preset again.` }; elements.amba_tsunami = { color: ["#2449d1","#4b6adb","#8093d9"], + excludeRandom: true, behavior: behaviors.WALL, properties: { active: true, @@ -35842,6 +35891,7 @@ Make sure to save your command in a file if you want to add this preset again.` elements.megatsunami = { color: ["#1f2aa3","#2641c9","#3a57c9"], behavior: behaviors.WALL, + excludeRandom: true, properties: { active: true, }, @@ -35922,6 +35972,7 @@ Make sure to save your command in a file if you want to add this preset again.` elements.lava_tsunami = { color: ["#ff370a","#e84a23","#e67740"], behavior: behaviors.WALL, + excludeRandom: true, properties: { active: true, }, @@ -36012,6 +36063,7 @@ Make sure to save your command in a file if you want to add this preset again.` elements.lava_megatsunami = { color: ["#b32b10","#c24d1f","#d66924"], behavior: behaviors.WALL, + excludeRandom: true, properties: { active: true, }, @@ -39929,7 +39981,7 @@ Make sure to save your command in a file if you want to add this preset again.` }; }); function propPrompt() { - propProperty = prompt("Enter the property you want to set"); + propProperty = prompt("(Prop) Enter the property you want to set"); propValue = prompt("Enter the value you want to set to"); //special check: element if(propProperty === "element") { @@ -40108,7 +40160,7 @@ Make sure to save your command in a file if you want to add this preset again.` if(oldProperty === null) { oldProperty = "temp"; }; - numberAdjusterProperty = prompt("Enter the property you want to change"); + numberAdjusterProperty = prompt("(Number adjuster) Enter the value you want to change"); if(numberAdjusterProperty === null) { numberAdjusterProperty = oldProperty; return false; From 014c88cb58124bd1e929899bff5abcf73c57b73d Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Sun, 16 Feb 2025 18:15:40 -0500 Subject: [PATCH 10/34] yea --- mods/nousersthings.js | 45 +++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index dddd9106..1443a631 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -1575,8 +1575,6 @@ elements.blackhole_storage = { tick: function(pixel) { if (!pixel.bhcontents){ pixel.bhcontents = []; - } else { - pixel.decidedcontent = pixel.bhcontents[Math.floor(Math.random()*pixel.bhcontents.length)]; } for (var i = 0; i < squareCoords.length; i++) { var coord = squareCoords[i]; @@ -1588,15 +1586,15 @@ elements.blackhole_storage = { pixel.bhcontents.push(otherPixel); deletePixel(otherPixel.x, otherPixel.y); } - } else if (pixel.charge && isEmpty(x,y) && pixel.decidedcontent){ - var otherPixel = pixelMap[x][y]; - pixel.decidedcontent.x = x; - pixel.decidedcontent.y = y; - delete pixel.decidedcontent.del; - otherPixel = pixel.decidedcontent; - currentPixels.push(pixel.decidedcontent); - pixel.bhcontents.splice(pixel.bhcontents.indexOf(pixel.decidedcontent), 1); - pixel.decidedcontent = pixel.bhcontents[Math.floor(Math.random()*pixel.bhcontents.length)]; + } else if (pixel.charge && isEmpty(x,y) && pixel.bhcontents.length){ + let randomindex = Math.floor(Math.random()*pixel.bhcontents.length); + let releasedPixel = pixel.bhcontents[randomindex] + pixel.bhcontents.splice(randomindex, 1) + delete releasedPixel.del + releasedPixel.x = x + releasedPixel.y = y + pixelMap[x][y] = releasedPixel + currentPixels.push(releasedPixel) } } }, @@ -3905,4 +3903,27 @@ elements.false_vacuum = { }, movable: false, hardness: 1 -} \ No newline at end of file +} +let signInput = "Hello World!"; +elements.sign = { + color: "#FFFFFF", + darkText: true, + category: "special", + onSelect: function(){ + let signi = prompt("What text should the sign display?", signInput||"Hello World!") + signInput = signi; + }, + renderer: function(pixel, ctx){ + if (!pixel.sign){pixel.sign = signInput} + }, + movable: false +} +renderPostPixel(function(ctx){ + for (pixel of currentPixels){ + if (pixel.element == "sign" && pixel.sign){ + ctx.font = `12pt PressStart2P` + ctx.fillStyle = pixel.color; + ctx.fillText(pixel.sign, canvasCoord(pixel.x), canvasCoord(pixel.y)) + } + } +}) \ No newline at end of file From 520b20612967bb9dfadffa6dff004cf3d73dfdc2 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Sun, 16 Feb 2025 18:18:21 -0500 Subject: [PATCH 11/34] f --- mods/nousersthings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index 1443a631..5185528b 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -3921,7 +3921,7 @@ elements.sign = { renderPostPixel(function(ctx){ for (pixel of currentPixels){ if (pixel.element == "sign" && pixel.sign){ - ctx.font = `12pt PressStart2P` + ctx.font = `12pt Arial` ctx.fillStyle = pixel.color; ctx.fillText(pixel.sign, canvasCoord(pixel.x), canvasCoord(pixel.y)) } From 6e4a05ccb60a3bc27c826c872e5f164f7d4660c4 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Sun, 16 Feb 2025 22:07:48 -0500 Subject: [PATCH 12/34] =?UTF-8?q?=CF=890.3=20corium?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mods/a_mod_by_alice.js | 277 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 270 insertions(+), 7 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 0805f486..b7cdb421 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -1,5 +1,5 @@ var modName = "mods/../a_mod_by_alice.js" //can't do "alice's mod" because the apostrophe will fuck up code, be too confusing, or both -//Version ω0.2 [???] +//Version ω0.3 [Corium update] var dependencies = ["mods/libhooktick.js", "mods/chem.js", "mods/minecraft.js", "mods/Neutronium Mod.js", "mods/fey_and_more.js", "mods/velocity.js", "mods/ketchup_mod.js", "mods/moretools.js", "mods/aChefsDream.js", "mods/nousersthings.js"]; //thanks to mollthecoder, PlanetN9ne, StellarX20 (3), MelecieDiancie, R74n, Nubo318, Sightnado, SquareScreamYT, and NoUsernameFound var dependencyExistence = dependencies.map(x => enabledMods.includes(x)); var allDependenciesExist = dependencyExistence.reduce(function(a,b) { return a && b }); @@ -2695,11 +2695,12 @@ color1 and color2 spread through striped paint like dye does with itself. col booleanSynonyms = [ "boolean", "bool", "boole", "boo", "bo", "bl", "b" ]; arraySynonyms = [ "arr", "a", "ar", "list" ]; defaultStringTypeValues = ["element","color","clone","changeTo","void","type","spawn"]; - defaultNumberTypeValues = ["x","y","charge","temp","start","vx","vy","chargeCD","start","burnStart","dir","panic","r","frequency","length","delay","volume","debounce","debounceLength","speed","fall","penetrateCounter","chargeCounter","spawnCounter","spawnTime","squadiusX","squadiusY","spawnTries","counter","attachDirection","value","range","xSpacing","ySpacing","maxPixels","explosionRadius","circleRadius","breakAroundRadius"]; + defaultNumberTypeValues = ["x","y","charge","temp","start","vx","vy","chargeCD","start","burnStart","dir","panic","r","frequency","length","delay","volume","debounce","debounceLength","speed","fall","penetrateCounter","chargeCounter","spawnCounter","spawnTime","squadiusX","squadiusY","spawnTries","counter","attachDirection","value","range","xSpacing","ySpacing","maxPixels","explosionRadius","circleRadius","breakAroundRadius","radiation"]; defaultBooleanTypeValues = ["burning","dead","hissing","following","dirLocked","del","didChargeBlueTinted","shooting","del","spawnAtPixelTemp","overwrite"]; defaultArrayTypeValues = ["attachOffsets"]; synonymsOfTrue = ["true", "t", "1", "yes"]; synonymsOfFalse = ["false", "f", "0", "no"]; + //FORCE DATA FOOTER TO 2 LINES SO IT NEVER HIDES INFO //ENABLE RUNNING CODE AFTER STATE ELEMENT AUTOGENERATION (runAfterAutogen) ## resizeCanvas = function(newHeight,newWidth,newPixelSize,clear) { var gameCanvas = document.getElementById("game"); @@ -4405,6 +4406,12 @@ color1 and color2 spread through striped paint like dye does with itself. col pixel1[key] = r.attr1[key]; } } + if (r.propAdds1) { // add value to each attribute to pixel1 + for (var key in r.propAdds1) { + pixel1[key] ??= 0; + pixel1[key] += r.propAdds1[key] + } + } if (r.stain1) { stainPixel(pixel1,r.stain1,0.05); } if (r.elem2 !== undefined) { // if r.elem2 is an array, set elem2 to a random element from the array, otherwise set it to r.elem2 @@ -4429,6 +4436,12 @@ color1 and color2 spread through striped paint like dye does with itself. col pixel2[key] = r.attr2[key]; } } + if (r.propAdds2) { // add value to each attribute to pixel2 + for (var key in r.propAdds2) { + pixel2[key] ??= 0; + pixel2[key] += r.propAdds2[key] + } + } if (r.stain2) { stainPixel(pixel2,r.stain2,0.05); } if(r.func && pixel1 && pixel2) { r.func(pixel1,pixel2); @@ -4653,7 +4666,7 @@ color1 and color2 spread through striped paint like dye does with itself. col color: ["#daff21","#a6ff00","#ffff00"], behavior: [ "XX|CR:radiation%0.1|XX", - "CR:radiation%0.1|XX|CR:radiation%0.1", + "CR:radiation%0.1|DEL%0.02 AND CH:rad_smoke%0.2|CR:radiation%0.1", "XX|CR:radiation%0.1|XX", ], tick: function(pixel) { @@ -5765,7 +5778,7 @@ color1 and color2 spread through striped paint like dye does with itself. col var data = elements[pixel.element]; var _color = data.color; if(Array.isArray(_color)) { - _color = _color[Math.floor(pixelTicks / 6) % _color.length] + _color = _color[Math.floor(pixelTicks / 10) % _color.length] }; drawSquare(ctx,_color,pixel.x,pixel.y,undefined,1 - (data.alpha ?? 0)) } @@ -13647,7 +13660,7 @@ Pixel size (rendering only): (Use if the save looks cut o }; var displayTemp = Math.round(_temp); if(displayTemp > 999999999) { - var shrinkage = (10 ** (Math.floor(Math.log10(_temp)) - 4)); + var shrinkage = (10 ** (Math.floor(Math.log10(_temp)) - 2)); displayTemp = [Math.floor(_temp/shrinkage),"e",Math.log10(shrinkage),suffix].join(""); } else { displayTemp = Math.round(_temp).toString() + suffix; @@ -13717,6 +13730,9 @@ Pixel size (rendering only): (Use if the save looks cut o statsDiv.style["font-size"] = "75%" } } + //Force stats bar to be 2 lines tall so it never hides info + var statsBar = document.getElementById("stats"); + statsBar.style.height = "3em"; } //Moved to window.onload where gameDiv should be guaranteed to exist } catch (error) { @@ -18523,7 +18539,27 @@ Pixel size (rendering only): (Use if the save looks cut o density: 6520, conduct: 0.19, hardness: 0.5, + forceAutoGen: true }, + eLists.NUCLEARFUEL = ['uranium', 'molten_uranium', 'enriched_uranium', 'molten_enriched_uranium', 'uranium_dioxide', 'enriched_uranium_dioxide', 'molten_uranium_dioxide', 'molten_enriched_uranium_dioxide', 'uranium233', 'uranium235', 'uranium_gas', 'plutonium', 'molten_plutonium', 'enriched_plutonium', 'molten_enriched_plutonium', 'plutonium_dioxide', 'molten_plutonium_dioxide', 'enriched_plutonium_dioxide', 'molten_enriched_plutonium_dioxide', 'uranium_gas', 'plutonium_gas']; + elements.molten_zirconium = { + tick: function(pixel) { + var neighbors = getVonNeumannNeighbors(pixel); + var lavaNeighbors = neighbors.filter(p => (eLists.MAGMA.includes(p.element)) || p.element.includes("molten_dirt")); + var fuelNeighbors = neighbors.filter(p => (eLists.NUCLEARFUEL.includes(p.element))); + if((lavaNeighbors.length > 0) && (fuelNeighbors.length > 0)) { + var aLavaNeighbor = randomChoice(lavaNeighbors); + var aFuelNeighbor = randomChoice(fuelNeighbors); + var coria = [pixel,aLavaNeighbor,aFuelNeighbor]; + for(var i = 0; i < coria.length; i++) { + var newPixel = coria[i]; + if(!newPixel) { continue }; + changePixel(newPixel,"corium",false); + if(newPixel.temp < elements.corium.temp) { newPixel.temp = elements.corium.temp }; //changeTemp upwards only + } + } + } + } newPowder("zirconia",["#F0ECDB","#FBF8EC"],5680,2715) elements.solid_zirconia = newPowder("zirconia",["#F0ECDB","#FBF8EC"],5680,2715,null,"zirconia",0.85,true); elements.molten_magnesium ??= {}; elements.molten_magnesium.tempHigh = 1090; @@ -18580,7 +18616,226 @@ Pixel size (rendering only): (Use if the save looks cut o }; elements.neutron.state = "gas"; elements.neutron.ignoreAir = "true"; - neighbors = [[-1,0],[0,-1],[1,0],[0,1]] + neighbors = [[-1,0],[0,-1],[1,0],[0,1]]; + + function coriumSteamExpHeat(pixel,x,y,radius,fire,smoke,power,damage) { + var distance = pyth(x,y,pixel.x,pixel.y); + var closeness = Math.abs(radius - distance); + var closenessProportion = closeness / radius; + pixel.temp += 25; + if(Math.random() < Math.sqrt(closenessProportion)) { + if(pixel.element.endsWith("water")) { + pixel.temp += 325; + pixelTempCheck(pixel) + } + }; + + //double velocity + if (!elements[pixel.element].excludeRandom && !elements[pixel.element].excludeVelocity) { + var angle = Math.atan2(pixel.y-y,pixel.x-x); + pixel.vx = Math.round((pixel.vx|0) + Math.cos(angle) * (radius * power/10)); + pixel.vy = Math.round((pixel.vy|0) + Math.sin(angle) * (radius * power/10)); + } + + } + + //and the reason I added zirconium in the first place + elements.corium = { + color: ["#F4D851","#A9B335","#E1710F"], + behavior: behaviors.MOLTEN, + tick: function(pixel) { + pixel.radiation ??= 150; + var range = Math.ceil(Math.log(((pixel.radiation ?? 50) ** (0.583)) + 1)) + if(isNaN(pixel.radiation)) { pixel.temp += 10; pixel.radiation = 150 }; + if(isNaN(pixel.temp)) { pixel.temp = 2400 }; + pixel.temp += (pixel.radiation / 75); + if(pixel.radiation > 0) { + for(var dx = -range; dx <= range; dx++) { + for(var dy = -range; dy <= range; dy++) { + if(Math.random() < (pixel.radiation * 0.003)) { + var distance = Math.sqrt((Math.abs(dx)**2) + (Math.abs(dy)**2)); + if(distance > range) { continue }; + var x = pixel.x + dx; + var y = pixel.y + dy; + if(isEmpty(x,y,false)) { + createPixelReturn("radiation",x,y).temp = pixel.temp; + } + } + } + } + }; + pixel.radiation *= 0.99975; + }, + reactions: { + "magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "felsic_magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "intermediate_felsic_magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "intermediate_magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "ultramafic_magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "crimson_magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "blackpinkinitic_magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "rainbow_magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "nellish_magma": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_slag": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_steel": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_zirconium": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_zirconia": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_carbon": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_dirt": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_tuff": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_glass": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "molten_silica": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "fallout": { func(pixel1,pixel2) { + changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02 + }, + "iodine": { elem2: null }, + "caesium": { elem2: null }, + "barium": { elem2: null }, + "ash": { elem2: null }, + "liquid_irradium": { elem2: ["liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium",null], temp1: 1.5, propAdds1: { radiation: 10 } }, + "pure_water": { elem1: "intermediate_magma", elem2: "pure_water", changeTemp: true }, + "chilly_water": { elem1: "intermediate_magma", elem2: "pure_water", temp1: -500, temp2: -100 } + }, + hoverStat: function(pixel) { return "rad.lvl. " + (pixel.radiation ?? 150).toLocaleString(undefined,{maximumFractionDigits: 1}) }, + temp: 2400, + tempLow: 1400, //made up + stateLow: "solidified_corium", + tempHigh: 4400, //made up + viscosity: 8, //bad guesstrapolation from https://www.kns.org/files/pre_paper/36/16A-362%EA%B9%80%EC%9B%85%EA%B8%B0.pdf + category: "liquids", + state: "liquid", + density: 7058 //assuming a 0.456 U-Zr ratio, and with uranium dioxide's density of 10970 subject to Sandboxels's standard molten density approximation of -10% because no data is available, and 4700 for liquid ZrO2, but this doesn't account for the variety of other s*** that gets in corium + }; + + /*for(var key in elements.corium.reactions) { + var r = elements.corium.reactions[key] + if(r.elem1 !== "corium") { continue }; + elements[key] ??= {}; + elements[key].reactions ??= {}; + elements[key].reactions.corium ; + }*/ + + elements.solidified_corium = { + color: ["#5D4D36","#535F30","#414137"], + behavior: behaviors.POWDER, + tick: function(pixel) { + pixel.radiation ??= 10; + var range = Math.ceil(Math.log(((pixel.radiation ?? 10) ** (0.583)) + 1)) + pixel.temp += 2; + if(isNaN(pixel.radiation)) { pixel.temp += 3; pixel.radiation = 150 }; + for(var dx = -range; dx <= range; dx++) { + for(var dy = -range; dy <= range; dy++) { + if(Math.random() < 0.03 + (pixel.radiation * 0.0025)) { + var distance = Math.sqrt((Math.abs(dx)**2) + (Math.abs(dy)**2)); + if(distance > range) { continue }; + var x = pixel.x + dx; + var y = pixel.y + dy; + if(isEmpty(x,y,false)) { + createPixelReturn("radiation",x,y).temp = pixel.temp; + } + } + } + }; + pixel.radiation *= 0.9998; + }, + hoverStat: elements.corium.hoverStat, + reactions: { + "pure_water": { elem1: "andesite", elem2: "pure_water", changeTemp: true }, + "chilly_water": { elem1: "solidified_corium", elem2: ["chilly_water","steam"], temp1: -500, temp2: -100 }, + "liquid_irradium": { elem2: ["liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium",null], temp1: 1.5, propAdds1: { radiation: 10 } } + }, + temp: 50, + tempHigh: 1400, //made up + stateHigh: "corium", + category: "solids", + state: "solid", + density: 11800 //assuming a 0.456 U-Zr ratio, and with uranium dioxide's density of 10970 subject to Sandboxels's standard molten density approximation of -10% because no data is available, and 4700 for liquid ZrO2, but this doesn't account for the variety of other s*** that gets in corium + }; + + if(eLists.WATER) { + for(var i = 0; i < eLists.WATER.length; i++) { + var water = eLists.WATER[i]; + if(water == "chilly_water" || water == "pure_water") { continue }; + elements.corium.reactions[water] = { func(pixel1,pixel2) { + explodeAt(pixel1.x,pixel1.y,5,"fire,rad_steam,rad_steam,rad_steam,steam,steam,radiation","steam,radiation",null,coriumSteamExpHeat) + }, temp1: 50, chance: 0.01 } + } + }; + + elements.corium_gas = { + tick: elements.corium.tick, + hoverStat: elements.corium.hoverStat, + reactions: { + "liquid_irradium": { elem2: ["liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium",null], temp1: 1.5, propAdds1: { radiation: 10 } }, + "pure_water": { elem1: "intermediate_magma", elem2: "pure_water", changeTemp: true }, + "chilly_water": { elem1: "solidified_corium", elem2: "steam", temp1: -500, temp2: -100 } + }, + density: 20 + }; + + elements.pure_water.reactions.dirty_water = elements.pure_water.reactions.water + + radiationIncreaseOverrides = { + molten_uranium238: 1, + molten_actinium: 5, + molten_protactinium: 3, + molten_americium: 3, + molten_berkelium: 3, + molten_californium: 3, + molten_einsteinium: 5, + molten_fermium: 5, + molten_nihonium: 5, + molten_moscovium: 10, + molten_livermorium: 10, + molten_tennessine: 10, + molten_oganesson: 10, + molten_nihonium_oxide: 10, + molten_flerovium_oxide: 10, + molten_livermorium_oxide: 10, + "molten_p9-leeseocid": 10, + } + var radioactives = eLists.NUCLEARFUEL; radioactives.push("molten_uranium","molten_uranium238","molten_neptunium","molten_uranium238","molten_actinium","molten_protactinium","molten_americium","molten_berkelium","molten_californium","molten_einsteinium","molten_fermium","molten_nihonium","molten_moscovium","molten_livermorium","molten_tennessine","molten_oganesson","molten_nihonium_oxide","molten_flerovium_oxide","molten_livermorium_oxide","molten_p9-leeseocid") + for(var i = 0; i < radioactives.length; i++) { + var radioactive = radioactives[i]; + elements.corium.reactions[radioactive] ??= { elem2: null, temp1: 1, chance: 0.1, propAdds1: { radiation: radiationIncreaseOverrides[radioactive] ?? 2 } } + } + //Non-element: Liquid ammonia elements.liquid_ammonia = { color: "#bab6a9", @@ -23205,6 +23460,7 @@ Pixel size (rendering only): (Use if the save looks cut o stain: 0.01, _data: [particulateInfo._data[0], particulateInfo._data[1], "suspension"], } + if(eLists.WATER) { eLists.WATER.push(suspensionName) }; elements[suspensionName].reactions[suspensionName] = { "elem1":"water", "elem2":sedimentName, "chance": 0.001 }, elements[suspensionName].reactions[particulateName] = { "elem1": "water", "elem2":sedimentName, "chance": 0.0005 }, //Sediment element where lithification code resides @@ -23282,6 +23538,8 @@ Pixel size (rendering only): (Use if the save looks cut o }; }; }; + if(!eLists.WATER) { console.error(38309309) }; + if(eLists.WATER) { eLists.WATER.push("swamp_water","heavy_water","radioactive_water","milk") }; newPowder("calcite","#f5ecd0",2711,825,["carbon_dioxide","quicklime"],"calcium_carbonate_dust"); newPowder("aragonite","#e3c58d",2830,825,["carbon_dioxide","quicklime"],"calcium_carbonate_dust"); newPowder("vaterite","#e8ebd8",2540,825,["carbon_dioxide","quicklime"],"calcium_carbonate_dust"); @@ -23318,6 +23576,8 @@ Pixel size (rendering only): (Use if the save looks cut o }; }; runAfterLoad(function() { + eLists.MAGMA = Object.keys(elements).filter(x => x.includes("magma") && !(x.includes("vaporized")) && !(x.includes("cloud"))) + for(i = 0; i < sands.length; i++) { switch(sands[i]) { case "dirt": @@ -45730,7 +45990,10 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa //END ## console.log("Mod loaded"); - window.addEventListener("load",function() {logMessage("a_mod_by_alice.js requires many other mods. Many of the elements and features added with it installed are actually added by the other mods it depends on.")}) + window.addEventListener("load",function() { + logMessage("a_mod_by_alice.js requires many other mods. Many of the elements and features added with it installed are actually added by the other mods it depends on.") + logMessage('These mods are libhooktick.js, chem.js, minecraft.js, Neutronium Mod.js, fey_and_more.js, velocity.js, ketchup_mod.js, moretools.js, aChefsDream.js, nousersthings.js. They were enabled automatically') + }) } catch (error) { alert(`Load failed (try reloading).\nThis is likely a sporadic failure caused by inconsistencies in how mods are loaded, and will likely fix itself in a refresh or two. If it persists, then it's an issue.\nError: ${error.stack}`); console.error(error) From d4c44b11000bdb940ac304338561d6c94d75ae77 Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Tue, 18 Feb 2025 14:32:19 -0500 Subject: [PATCH 13/34] my first mod but better --- mods/charsonsmoduno.js | 2033 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2033 insertions(+) create mode 100644 mods/charsonsmoduno.js diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js new file mode 100644 index 00000000..96fb3f8e --- /dev/null +++ b/mods/charsonsmoduno.js @@ -0,0 +1,2033 @@ +//thanks r74n and sandboxels mod devs for the idea for making this and adding so much value to my gaming experience +//if one needs a desc for the mod list on the website it'd be something around "charson's mods compiled such as random foods and random elements asked for by random people, beta" +//thanks! + +//needs absolute zero to be set to -99999999999999999999999999999 + +//n2s - for food, change all instances of ', elem2:"head"' into nothing. + +elements.calcium_chloride = { + color: "#ffffff", + behavior: behaviors.STURDYPOWDER, + category: "powders", + hidden: true, + breakInto: ["calcium", "chlorine"], + state: "solid", + tempHigh: 772, + reactions: { + "sodium_carbonate": { elem1:"foam", elem2:"chalk" }, + } +}; + +if (!elements.calcium.reactions) { // Include this block once + elements.calcium.reactions = {} // This creates the property if it doesn't exist +} +elements.calcium.reactions.chlorine = { elem1: "calcium_chloride" } + +if (!elements.aluminum.reactions) { // Include this block once + elements.aluminum.reactions = {} // This creates the property if it doesn't exist +} +elements.aluminum.reactions.oxygen = { elem1: "alumina" } + +if (!elements.nitrogen.reactions) { // Include this block once + elements.nitrogen.reactions = {} // This creates the property if it doesn't exist +} +elements.nitrogen.reactions.fire = { elem1: "pyrane" } + +if (!elements.radiation.reactions) { // Include this block once + elements.radiation.reactions = {} // This creates the property if it doesn't exist +} +elements.radiation.reactions.dead_plant = { elem2: "radioactive_maple_seed" } +elements.radiation.reactions.ant = { elem2: "rad_ant" } +elements.radiation.reactions.sugar = { elem2: "powdered_lime" } +elements.radiation.reactions.soap = { elem2: "purificanol" } +elements.radiation.reactions.diamond = { elem2: "emerald" } + +if (!elements.melted_cheese.reactions) { // Include this block once + elements.melted_cheese.reactions = {} // This creates the property if it doesn't exist +} +elements.melted_cheese.reactions.sauce = { elem2: "akshajium" } + +if (!elements.sodium.reactions) { // Include this block once + elements.sodium.reactions = {} // This creates the property if it doesn't exist +} +elements.sodium.reactions.carbon_dioxide = { elem1: "sodium_carbonate" } + +elements.sodium_carbonate = { + color: "#ffffff", + behavior: behaviors.POWDER, + category: "powders", + hidden: true, + breakInto: ["sodium", "carbon_dioxide"], + state: "solid", + tempHigh: 851, + reactions: { + "calcium_chloride": { elem1:"foam", elem2:"chalk" }, + } +}; + +elements.silicon = { + color: ["#9EBFE2", "#686F89", "#9BA4AB", "#373D4D"], + behavior: behaviors.STURDYPOWDER, + desc: "Silicon is a chemical element. It has symbol Si and atomic number 14. It is a hard, brittle crystalline solid with a blue-grey metallic lustre, and is a tetravalent metalloid and semiconductor.", + category: "solids", + state: "solid", + tempHigh: 1414, + reactions: { + "oxygen": { elem1:"silicate", elem2:"pop" }, + } +}; + +elements.alumina = { + color: ["#989ECE", "#DADAFF", "#E6E1FF"], + behavior: behaviors.POWDER, + category: "powders", + hidden: true, + state: "solid", + tempHigh: 500, + stateHigh: "hyper_aluminum", + reactions: { + "silicate": { elem1:"kaolin", elem2:"kaolin" }, + } +}; + +elements.hyper_aluminum = { + color: ["#61829e", "#61829e", "#61829e", "#61829e", "#5872a7"], + behavior: behaviors.WALL, + category: "solids", + hidden: true, + state: "solid", + tempHigh: 9999999, + conduct: 1, + charge: 3, + stateHigh: "molten_aluminum", + hardness: 0.95, +}; + +elements.silicate = { + color: ["#A6B5B8", "#A7A8A0", "#665953", "#BDDAE8"], + behavior: behaviors.POWDER, + category: "powders", + hidden: true, + breakInto: "dust", + state: "solid", + tempHigh: 500, + stateHigh: "molten_silicon", + reactions: { + "alumina": { elem1:"kaolin", elem2:"kaolin" }, + } +}; + +elements.kaolin = { + color: ["#A6B5B8", "#A7A8A0", "#665953", "#BDDAE8"], + behavior: behaviors.POWDER, + category: "land", + hidden: true, + state: "solid", + tempHigh: 500, + stateHigh: "porcelain", + reactions: { + "fired_clay": { elem1:"porcelain", elem2:"porcelain" }, + "blood": { elem2: null }, + "dirt": { elem1: "clay", elem2:"clay_soil" }, + } +}; + +elements.chalk = { + color: ["#D8275D", "#E0527D", "#AF508C", "#BF73A3"], + stain: 0.5, + stainSelf: true, + canContain: true, + related: ["art", "calcium"], + customColor: true, + hidden: true, + category: "solids", + breakInto: "chalk_powder", + state: "solid", + tempHigh: 5900, + stateHigh: "ash", +}; + +elements.chalk_powder = { + color: ["#D8275D", "#E0527D", "#AF508C", "#BF73A3"], + stain: 0.3, + behavior: behaviors.POWDER, + stainSelf: true, + hidden: true, + customColor: true, + category: "powders", + state: "solid", + tempHigh: 5900, + stateHigh: "ash", +}; + +elements.powdered_lime = { + color: ["#96F10E", "#BEF00F"], + stain: 0.2, + hidden: true, + behavior: behaviors.POWDER, + category: "food", + state: "solid", + reactions: { + "water": { elem1:"foam", elem2:"limeade" }, + "head": { elem1: null, chance: 0.9 }, + } +}; + +elements.limeade = { + color: ["#96F10E", "#BEF00F", "#96F10E"], + alpha: 0.9, + stain: 0.1, + behavior: behaviors.LIQUID, + category: "food", + state: "solid", + tempHigh: 105, + stateHigh: "foam", + tempLow: 0, + reactions: { + "head": { elem1: null, chance: 0.7 }, + } +}; + +//stupidity mod begins here + +elements.stupid = { + color: ["#eb3486", "#0affda", "#c7fa89"], + behavior: behaviors.POWDER, + category: "weapons", + viscosity: 10000, + state: "solid", + related: ["di_stupid", "tri_stupid"], + density: 100, + desc: "stupid", + temp: 20, + tempLow: 19, + tempHigh: 21, + reactions: { + "water": { elem1:"blaster", elem2:"nuke", chance: 0.001 }, + "stupid": { elem1:"cloner", elem2:"nuke", chance: 0.5 }, + "electric": { elem1:"di_stupid", elem2:"tri_stupid" }, + "dirt": { elem1:"tornado", elem2:"stupid", chance: 0.5 }, + } +}; + +elements.di_stupid = { + color: ["#0b3486", "#faffda", "#07fa89"], + behavior: behaviors.POWDER, + category: "weapons", + viscosity: 10000, + state: "solid", + density: 100, + hidden: true, + desc: "stupid", + temp: 20, + tempLow: 19, + tempHigh: 21, + reactions: { + "di_stupid": { elem1:"di_stupid", elem2:"tsunami", chance: 0.001 }, + "stupid": { elem1:"party_popper", elem2:"cloner" }, + "water": { elem1:"earthquake", elem2:"acid" }, + } +}; + +elements.almond = { + color: ["#855b34", "#9c836b", "#f5e7da"], + behavior: behaviors.POWDER, + category: "food", + state: "solid", + density: 100, + desc: "stupid", + temp: 20, + tempLow: 10, + tempHigh: 40, + stateHigh: "nut_sauce", + breakInto: "nut_sauce", + stateLow: "cloner", + conduct: 1, + reactions: { + "head": { elem1: null, chance: 0.55 }, + "juice": { elem1:"party_popper", elem2:"party_popper" }, + "water": { elem1:"nut_sauce", elem2:"almond_water" }, + } +}; + +elements.nut_sauce = { + color: ["#f2cba7", "#f5e7da"], + behavior: behaviors.LIQUID, + category: "food", + viscosity: 10000, + state: "liquid", + density: 100, + desc: "Highly flammable.", + temp: 20, + tempLow: 0, + tempHigh: 50, + hidden: true, + stateHigh: ["blaster", "floating_cloner"], + stateHighColor: "#EF5810", + stateLow: "glue", + conduct: 1, + reactions: { + "head": { elem1: null, chance: 0.9 }, + } +}; + +elements.tri_stupid = { + color: ["#ffffff", "#7a1d1d", "#000000"], + behavior: behaviors.POWDER, + category: "weapons", + viscosity: 10000, + state: "solid", + density: 100, + desc: "stupid", + temp: 20, + tempLow: 0, + hidden: true, + tempHigh: 40, + stateLow: "ice", + stateHigh: "magma", + conduct: 1, + reactions: { + "almond": { elem1:"hot_bomb", elem2:"cold_bomb" }, + "nut_sauce": { elem1:"heat_ray", elem2:"freeze_ray" }, + } +}; + +//milkandsoap aka milkandstupidity mod begins here + +elements.maple_syrup = { + color: "#a13d08", + behavior: behaviors.LIQUID, + category: "liquids", + viscosity: 100000, + state: "liquid", + density: 720, + isFood: true, + stain: 0.01, + desc: "english for sirop derable", + reactions: { + "head": { elem1: null, chance: 0.4 }, + } +}; + +elements.radioactive_maple_seed = { + color: ["#52d156", "#5d875f"], + behavior: behaviors.RADPOWDER, + behaviorOn: [ + "XX|XX|XX", + "XX|EX:2>popcorn|XX", + "XX|XX|XX", +], + category: "life", + viscosity: 100000, + hidden: true, + state: "solid", + isFood: true, + desc: "how does this work", + reactions: { + "dirt": { elem1:"maple_nut", elem2:"dirt" }, + "grass": { elem1:"maple_nut", elem2:"dirt" }, + "ant": { elem1: null, elem2:"rad_ant" } + } +}; + +elements.maple_nut = { + color: "#735e3b", + behavior: behaviors.POWDER, + category: "life", + viscosity: 100000, + state: "solid", + isFood: true, + hidden: true, + desc: "I dont think this is biologically accurate", + breakInto: ["maple_syrup", "maple_powder"], + reactions: { + "dirt": { elem1:"maple_plant", elem2:"maple_nut", chance: 0.001 }, + } +}; + +elements.maple_plant = { + color: "#735e3b", + behavior: behaviors.STURDYPOWDER, + category: "life", + viscosity: 100000, + state: "solid", + isFood: true, + hidden: true, + desc: "I dont think this is biologically accurate", + breakInto: "dead_plant", + burn: 90, + reactions: { + "dirt": { elem1:"maple_plant", elem2:"maple_nut", chance: 0.001 }, + "plant": { elem1:"maple_plant", elem2:"maple_plant", chance: 0.1 }, + "dead_plant": { elem1:"maple_plant", elem2:"maple_plant", chance: 0.3 }, + "water": { elem1:"maple_plant", elem2:"maple_plant", chance: 0.0001 }, + } +}; + +elements.maple_powder = { + color: "#9e6213", + behavior: behaviors.POWDER, + category: "food", + viscosity: 100000, + state: "solid", + hidden: true, + isFood: true, + reactions: { + "milk": { elem1:"foam", elem2:"maple_milk" }, + "clay": { elem1: null, elem2:"terracotta" }, + } +}; + +elements.red_terracotta = { + color: "#c96363", + behavior: behaviors.WALL, + category: "solids", + state: "solid", + tempHigh: 500, + hidden: true, + stateHigh: "heated_terracotta", +}; + +elements.terracotta = { + color: ["#c98c63", "#B97140"], + hardness: 0.4, + singleColor: true, + behavior: behaviors.WALL, + category: "solids", + state: "solid", + tempHigh: 500, + stateHigh: "heated_terracotta", + breakInto: "brick_rubble", + breakIntoColor: "#A5775A", + reactions: { + "pyric_nitrite": { elem1:"red_terracotta", elem2: null }, + "sulfur": { elem1:"yellow_terracotta", elem2: null }, + "gold_coin": { elem1:"golden_terracotta", elem2: null }, + "scheele_green": { elem1:"green_terracotta", elem2: null }, + "rad_shard": { elem1:"teal_terracotta", elem2: null }, + "skibidi_soda": { elem1:"blue_terracotta", elem2: null }, + "violetium": { elem1:"purple_terracotta", elem2: null }, + } +}; + +elements.yellow_terracotta = { + color: "#c9ae63", + behavior: behaviors.WALL, + category: "solids", + state: "solid", + hidden: true, + tempHigh: 500, + stateHigh: "heated_terracotta", +}; + +elements.golden_terracotta = { + color: ["#EEC211", "#DBC624", "#E8D417", "#E7DD66"], + behavior: behaviors.WALL, + category: "solids", + state: "solid", + hidden: true, + tempHigh: 500, + breakInto: ["gold", "terracotta"], + stateHigh: ["heated_terracotta", "molten_gold", "slag"], +}; + +elements.green_terracotta = { + color: "#63c96d", + behavior: behaviors.WALL, + category: "solids", + state: "solid", + hidden: true, + tempHigh: 500, + stateHigh: "heated_terracotta", +}; + +elements.teal_terracotta = { + color: "#63c994", + behavior: behaviors.WALL, + category: "solids", + state: "solid", + tempHigh: 500, + hidden: true, + stateHigh: "heated_terracotta", +}; + +elements.blue_terracotta = { + color: "#63b6c9", + behavior: behaviors.WALL, + category: "solids", + state: "solid", + hidden: true, + tempHigh: 500, + stateHigh: "heated_terracotta", +}; + +elements.purple_terracotta = { + color: "#6f63c9", + behavior: behaviors.WALL, + category: "solids", + state: "solid", + tempHigh: 500, + hidden: true, + stateHigh: "heated_terracotta", +}; + +elements.heated_terracotta = { + color: "#db773d", + behavior: behaviors.STURDYPOWDER, + category: "states", + state: "solid", + temp: 500, + tempHigh: 1000, + hidden: true, + tempLow: 20, + stateLow: ["teracotta", "purity"], +}; + +elements.maple_milk = { + color: "#f5e3cb", + behavior: behaviors.LIQUID, + category: "food", + viscosity: 100000, + state: "liquid", + desc: "a great drink", + hidden: true, + isFood: true, + reactions: { + "head": { elem1: null, chance: 0.9 }, + } +}; + +elements.purity = { + color: "#f0f7fc", + behavior: behaviors.WALL, + category: "soaps", + state: "solid", + tempHigh: 70, + hidden: true, + stateHigh: "soap", + stain: 1, +}; + +elements.purium = { + color: "#cededd", + behavior: behaviors.WALL, + category: "soaps", + state: "solid", + hidden: true, + tempHigh: 125, + stateHigh: "purificanol", + stain: 1, + conduct: 1, + breakInto: "purium_dust", +}; + +elements.purium_dust = { + color: ["#cededd", "#95c7c4", "#ffffff"], + behavior: behaviors.POWDER, + category: "soaps", + hidden: true, + state: "solid", + tempHigh: 125, + stateHigh: ["purity", "soap"], + stain: 1, + conduct: 1, +}; + +elements.invalid = { + color: ["#ff00dc", "#010001"], + behavior: [ + ["XX","CR:malware","XX"], + ["XX","XX","XX"], + ["M2","M1","M2"] + ], + category: "machines", + state: "solid", + tempHigh: 9999, + desc: "INVALID DESCRIPTION", + stateHigh: "fallout", + tempLow: -40, + stateLow: "random", + conduct: 1, + breakInto: "electric", + reactions: { + "electric": { elem1: "null", elem2:"null" }, + } +}; + +elements.null = { + color: ["#514a57", "#2c1040"], + behavior: behaviors.WALL, + category: "machines", + state: "solid", + desc: "null", + tempLow: -40, + breakInto: "random", + stateLow: "unknown", + conduct: 1, + hidden: true, + reactions: { + "electric": { elem1: "null", elem2:"null" }, + } +}; + +elements.purificanol = { + color: "#ffffff", + behavior: behaviors.LIQUID, + category: "soaps", + viscosity: 100, + state: "liquid", + desc: "soap 3.0", + extinguish: true, + stain: 0.1, + behaviorOn: [ + ["XX","CO:5","XX"], + ["CO:5","XX","CO:5"], + ["CO:5 AND M1","CO:5 AND M1","CO:5 AND M1"] +], + density: 999999999, + temp: 1, + tempLow: -273, + stateLow: "foam", + reactions: { + "dirt": { elem1: "foam", elem2: "purity" }, + "dead_bug": { elem1: "foam", elem2: "ant" }, + "uranium": { elem1: "foam", elem2: "lead" }, + "chalk_powder": { elem1: "foam", elem2: "foam" }, + "poison": { elem1: "foam", elem2: "antidote" }, + "infection": { elem1: "bless", elem2: ["vaccine", "antibody"] }, + "fallout": { elem1: "anti_soap", elem2: "contaminol" }, + "sand": { elem1: "foam", elem2: "purity" }, + "dust": { elem1: "foam", elem2: "purity" }, + "ash": { elem1: "foam", elem2: "purity" }, + "rock": { elem1: "foam", elem2: "porcelain" }, + "clay": { elem1: "foam", elem2: "porcelain" }, + "magma": { elem1: "foam", elem2: "purium" }, + "slag": { elem1: "foam", elem2: "purity" }, + "molten_slag": { elem1: "foam", elem2: "purium_dust" }, + "basalt": { elem1: "foam", elem2: "purity" }, + "slime": { elem1: "foam", elem2: "purity" }, + "dirty_water": { elem1: "foam", elem2: "water" }, + "blood": { elem1: "foam", elem2: "water" }, + "molten_iron": { elem1: "foam", elem2: "purium" }, + "molten_dirt": { elem1: "foam", elem2: "purium" }, + "molten_copper": { elem1: "foam", elem2: "purium" }, + "rust": { elem1: "foam", elem2: "purium_dust" }, + "water": { elem1: "foam", elem2: "bubble" }, + "ice": { elem1: "foam", elem2: "bubble" }, + "steam": { elem1: "foam", elem2: "bubble" }, + "mudstone": { elem1: "foam", elem2: "porcelain" }, + "rad_ant": { elem1: "foam", elem2: "ant" }, + "dead_plant": { elem1: "foam", elem2: "plant" }, + "frozen_plant": { elem1: "foam", elem2: "plant" }, + "smoke": { elem1: "foam", elem2: "bless" }, + "fire": { elem1: "foam", elem2: "bless" }, + "meat": { elem1: "foam", elem2: "cooked_meat" }, + "rotten_meat": { elem1: "foam", elem2: "cured_meat" }, + "cancer": { elem1: "foam", elem2: "dna" }, + "thermite": { elem1: "foam", elem2: "null" }, + }, +}; + +elements.rad_ant = { + color: ["#6ceb36", "#50e012"], + behavior: behaviors.LIQUID, + category: "life", + state: "solid", + hidden: true, + desc: "uh oh", + tempHigh: 100, + stateHigh: ["dead_bug", "radiation"], + reactions: { + "dirt": { elem1:"rad_ant", elem2:"radiation" }, + "grass": { elem1:"rad_ant", elem2:"radioactive_maple_seed" }, + "ant": { elem1:"rad_ant", elem2:"rad_ant" }, + "rock": { elem1:"rad_ant", elem2:"uranium" }, + } +}; + +elements.buttermilk = { + color: "#f4f5c1", + behavior: behaviors.LIQUID, + category: "food", + state: "liquid", + desc: "Yum!", + hidden: true, + tempHigh: 100, + stateHigh: "steam", + reactions: { + "head": { elem1: null, chance: 0.9 }, + "water": { elem1: null, elem2:"milk" }, + "rock": { elem1: null, elem2:"butter" }, + "magma": { elem1: null, elem2:"melted_butter" }, + } +}; + +if (!elements.butter.reactions) { // Include this block once + elements.butter.reactions = {} // This creates the property if it doesn't exist +} +elements.butter.reactions.milk = { "elem1":null, "elem2":"buttermilk" } + +elements.stupid_particle = { + color: ["#eb3486", "#0affda", "#c7fa89"], + behavior: behaviors.BOUNCY, + category: "weapons", + state: "solid", + density: 0, + desc: "stupid", + temp: 20, + tempLow: 19, + tempHigh: 21, + reactions: { + "stupid_particle": { elem1:"neutron", elem2:"nuke", chance: 0.5}, + } +}; + +elements.boom_boom_particle = { + color: ["#00ff00", "#ff00dc", "#0000ff"], + behavior: behaviors.BOUNCY, + category: "weapons", + state: "gas", + density: 0, + desc: "andrew zhao", + temp: 20, + tempLow: 19, + tempHigh: 21, + reactions: { + "boom_boom_particle": { elem1:"explosion", elem2:"pop", chance: 0.7 }, + } +}; + +elements.julianite = { + color: ["#505050", "#265227"], + behavior: behaviors.RADPOWDER, + category: "special", + state: "liquid", + tempHigh: 999999, + stateHigh: "plasma", + tempLow: -25, + reactions: { + "electric": { elem1:"hyperjulianite" }, + "plasma": { elem1:"hyperjulianite" }, + "smoke": { elem1:"hyperjulianite" }, + "lightning": { elem1:"hyperjulianite" }, + "rock": { elem2:"julianite" }, + } +}; + +elements.hyperjulianite = { + color: ["#6A6A6A", "#522651"], + behavior: behaviors.SLIDE, + category: "states", + state: "solid", + hidden: true, + tempHigh: 1000, + tempLow: -40, + stateLow: "snake", + reactions: { + "static": { elem2:"julianite" }, + "rock": { elem2:"plasma" }, + "water": { elem2:"electric" }, + "dirt": { elem2:"battery" }, + "plant": { elem2:"snake" }, + } +}; + +elements.sankarium = { + color: ["#b5140e", "#494b52", "#d2d9d2"], + behavior: behaviors.BUBBLE, + category: "special", + state: "solid", + tempHigh: 100, + burn: 90, + fireColor: "#0c92f7", + burnInto: "c-4", + stateHigh: "narayananium", + reactions: { + "dirt": { elem1:"stupid" }, + } +}; + +elements.narayananium = { + color: ["#0EAFB5", "#525049", "#D9D2D9"], + behavior: behaviors.POWDER, + category: "special", + state: "solid", + hidden: true, + burn: 90, + fireColor: "#22DDA2", +}; + +elements.narayananium.behavior = [ + ["XX","XX","XX"], + ["XX","XX","XX"], + ["XX","M1 AND EX:10>party_popper","XX"], +]; + +elements.tetra_stupid = { + color: ["#4AB58A", "#B54A75"], + behavior: behaviors.SLIDE, + category: "weapons", + state: "solid", + hidden: true, + conduct: 1, +}; + +elements.banana = { + color: ["#F4FD3F", "#C3F30C", "#FBE904"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + desc: "minion reference", + burn: 90, + fireColor: "#ED126A", + burnInto: "fragrance", + conduct: 1, + breakInto: "banana_milk", + breakIntoColor: "#d8b284", + reactions: { + "head": { elem1: null, chance: 0.35 }, + "milk": { elem1: null, elem2: "banana_milk" }, + } +}; + +elements.banana_milk = { + color: "#fdfdce", + behavior: behaviors.LIQUID, + category: "food", + state: "liquid", + density: 10000, + charge: 1, + superconductAt: 100, + burn: 100, + viscosity: 29, + tempLow: -7, + hidden: true, + stateLowName: "frozen_banana_milkshake", + tempHigh: 239, + stateHigh: "steam", + fireColor: "#DD00FF", + burnInto: "dioxin", + conduct: 1, + reactions: { + "head": { elem1: null, chance: 0.9 }, + } +}; + +//particlesplus begins here + +elements.thermon = { + color: "#EB14AC", + behavior: behaviors.BOUNCY, + category: "energy", + desc: "The thermon is a subatomic particle with a negative one elementary electric charge as well as heat.", + state: "gas", + charge: 1, + maxSize: 1, + superconductAt: 1, + burning: true, + temp: 999, + fireColor: "#1CD8E3", + conduct: 1, + reactions: { + "thermon": { elem1: "superthermon", elem2: "neutron" }, + } +}; + +elements.superthermon = { + color: "#B010EF", + behavior: behaviors.BOUNCY, + hidden: true, + category: "energy", + desc: "The superthermon is a subatomic particle with a negative one elementary electric charge as well as high heat.", + state: "gas", + charge: 1, + maxSize: 1, + superconductAt: 1, + burning: true, + temp: 99999, + fireColor: "#1CD8E3", + conduct: 1, + reactions: { + "neutron": { elem1: "explosion" }, + "thermon": { elem1: "hyperthermon", elem2: "neutron" }, + } +}; + +elements.hyperthermon = { + color: ["#5554AB", "#FF9D00"], + behavior: behaviors.BOUNCY, + category: "energy", + hidden: true, + desc: "The hyperthermon is a subatomic particle with a negative one elementary electric charge as well as immense heat.", + state: "gas", + charge: 1, + maxSize: 1, + superconductAt: 1, + burning: true, + temp: 9999999, + fireColor: "#1CD8E3", + conduct: 1, + reactions: { + "neutron": { elem1: "explosion" }, + "electric": { elem1: "h_bomb" }, + "thermon": { elem1: "unstable_thermon", elem2: "neutron" }, + } +}; + +elements.unstable_thermon = { + color: ["#FFFFFF"], + behavior: behaviors.BOUNCY, + category: "energy", + desc: "ERROR", + hidden: true, + maxSize: 1, + state: "gas", + charge: 1, + superconductAt: 1, + burning: true, + temp: 9999999999999999999999999999999999999, + fireColor: "#1CD8E3", + conduct: 1, + reactions: { + "neutron": { elem1: "explosion" }, + "proton": { elem1: "dirty_bomb" }, + "electric": { elem1: "h_bomb" }, + "thermon": { elem1: "supernova", elem2: "neutron" }, + } +}; + + +elements.tetra_stupid.behavior = [ + ["CH:tetra_stupid","CH:banana","CH:tetra_stupid"], + ["CH:banana","XX","CH:banana"], + ["M2","M1 AND CH:banana","M2"] +]; + +elements.cryon = { + color: "#1FD1E0", + behavior: behaviors.BOUNCY, + category: "energy", + desc: "The cryon is a subatomic particle with a negative one elementary electric charge as well as negative heat.", + state: "gas", + charge: 1, + superconductAt: -273.5, + maxSize: 1, + temp: -99, + burn: 100, + fireColor: "#1CD8E3", + conduct: 1, + reactions: { + "cryon": { elem1: "supercryon", elem2: "neutron" }, + } +}; + +elements.supercryon = { + color: "#99B1C0", + behavior: behaviors.BOUNCY, + category: "energy", + desc: "The supercryon is a subatomic particle with a negative one elementary electric charge as well as extremely low heat.", + state: "gas", + hidden: true, + charge: 1, + maxSize: 1, + superconductAt: -273.5, + temp: -273.5, + hidden: true, + burn: 100, + fireColor: "#1CD8E3", + conduct: 1, + reactions: { + "neutron": { elem1: "explosion" }, + "cryon": { elem1: "hypercryon", elem2: "neutron" }, + } +}; + +elements.hypercryon = { + color: ["#0062FF", "#6424DB"], + behavior: behaviors.BOUNCY, + category: "energy", + desc: "The hypercryon is a subatomic particle with a negative one elementary electric charge as well as immense lack of heat.", + state: "gas", + charge: 1, + superconductAt: -273.5, + hidden: true, + temp: -999999, + burn: 100, + maxSize: 1, + fireColor: "#1CD8E3", + conduct: 1, + reactions: { + "neutron": { elem1: "explosion" }, + "electric": { elem1: "h_bomb" }, + "cryon": { elem1: "unstable_cryon", elem2: "neutron" }, + } +}; + +elements.unstable_cryon = { + color: ["#FFFFFF"], + behavior: behaviors.BOUNCY, + category: "energy", + maxSize: 1, + desc: "ERROR", + state: "gas", + charge: 1, + superconductAt: -273.5, + hidden: true, + temp: -999999999999999999999999999, + burn: 100, + fireColor: "#1CD8E3", + conduct: 1, + reactions: { + "neutron": { elem1: "explosion" }, + "proton": { elem1: "dirty_bomb" }, + "electric": { elem1: "h_bomb" }, + "cryon": { elem1: "supernova", elem2: "neutron" }, + } +}; + +elements.anti_soap = { + color: ["#0000FF"], + behavior: behaviors.FOAM, + category: "soaps", + state: "solid", + hidden: true, + burn: 100, + reactions: { + "soap": { elem2: null }, + "purificanol": { elem2: null }, + } +}; + +elements.violetium = { + color: ["#494bb3", "#7049b3", "#7049b3"], + category: "powders", + state: "solid", + temp: 40, + burn: 100, + fireColor: "#6e34eb", + conduct: 1, +}; + +elements.violetium.behavior = [ + ["XX","XX","XX"], + ["XX","XX","XX"], + ["XX","M1 AND EX:10>purple_gold","XX"], +]; + +elements.pyrus_minimus = { + color: ["#eb6e34", "#ffd014", "#ff143c"], + desc: "The rare Pyrus Minimus is a flying...animal? It preys on bird and worms.", + behaviorOn: [ + "XX|XX|XX", + "XX|EX:5>firework|XX", + "XX|XX|XX", +], + behavior: behaviors.FLY, + category: "life", + state: "solid", + foodNeed: 3, + breakInto: ["fire", "cooked_meat", "slime"], + glow: true, + temp: 300, + baby: "pyrus_minimus", + singleColor: true, + fireColor: "#ff5b14", + conduct: 1, + reactions: { + "cooked_meat": { elem2: null }, + "dead_plant": { elem2: null }, + "juice": { elem2: null }, + "chocolate": { elem2: null }, + "basalt": { elem2: null }, + "bird": { elem2: ["feather", "blood"] }, + "worm": { elem2: null }, + } +}; + +elements.stablium = { + color: ["#516c87", "#de1998", "#c4e043"], + behavior: behaviors.POWDER, + behaviorOn: [ + "XX|XX|XX", + "XX|EX:25>fw_ember,electric,flash,pop,proton|XX", + "XX|XX|XX", +], + category: "special", + state: "solid", + alpha: 0.73, + breakInto: ["positron", "electrum"], + glow: true, + temp: 20, + burn: 55, + singleColor: true, + fireColor: ["#f71e0a", "#f7940a", "#eff70a", "#0af722", "#0a69f7"], + conduct: 1, + tempHigh: 275, + reactions: { + "proton": { elem1: "ash", elem2: ["thermon", "cryon"] }, + } +}; + +elements.arsenic = { + color: ["#874809", "#97ad05"], + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + temp: 20, + burn: 55, + burnInto: "poison", + fireColor: "#a1ccc7", + tempHigh: 275, + reactions: { + "copper": { elem1: "scheele_green", elem2: "scheele_green" }, + } +}; + +elements.scheele_green = { + color: ["#2B7D45", "#87CA7C"], + behavior: behaviors.RADPOWDER, + category: "powders", + state: "solid", + alpha: 0.99, + temp: 20, + breakInto: "poison", + burn: 55, + burnInto: "poison", + fireColor: "#2cff29", + tempHigh: 275, + hidden: true, + stateHigh: "molten_copper", + reactions: { + "terracotta": { elem1: null, elem2: "green_terracotta" }, + "head": { elem1: "poison", elem2: "green_skull", chance: 0.3 }, + } +}; + +elements.green_skull = { + color: ["#67bf65", "#527d51"], + behavior: behaviors.RADPOWDER, + category: "powders", + state: "solid", + temp: 20, + breakInto: ["bone_meal", "fallout"], + burn: 55, + burnInto: "rad_shard", + hidden: true, + fireColor: "#573311", + tempHigh: 275, + stateHigh: "rad_steam", + reactions: { + "head": { elem2: "green_skull", chance: 0.1 }, + } +}; + +elements.contaminol = { + color: "#005F00", + behavior: behaviors.RADLIQUID, + category: "soaps", + viscosity: 100, + state: "liquid", + extinguish: true, + density: 999999999, + temp: 1, + tempLow: -273, + stateLow: "foam", + reactions: { + "dirt": { elem1: "foam", elem2: "impurity" }, + "purity": { elem1: "foam", elem2: "impurity" }, + "sand": { elem1: "foam", elem2: "tinder" }, + "dust": { elem1: "foam", elem2: "magnesium" }, + "ash": { elem1: "foam", elem2: "magnesium" }, + "rock": { elem1: "foam", elem2: "mudstone" }, + "clay": { elem1: "foam", elem2: "slag" }, + "magma": { elem1: "foam", elem2: "molten_uranium" }, + "purium_dust": { elem1: "foam", elem2: "rust" }, + "basalt": { elem1: "foam", elem2: "thermite" }, + "slime": { elem1: "foam", elem2: "magma" }, + "dirty_water": { elem1: "foam", elem2: "slime" }, + "water": { elem1: "foam", elem2: "oil" }, + "iron": { elem1: "foam", elem2: "impurium" }, + "molten_dirt": { elem1: "foam", elem2: "impurium" }, + "copper": { elem1: "foam", elem2: "rust" }, + "gold_coin": { elem1: "foam", elem2: "rust" }, + "ice": { elem1: "foam", elem2: "blood_ice" }, + "steam": { elem1: "foam", elem2: "rad_steam" }, + "porcelain": { elem1: "foam", elem2: "smoke" }, + "plant": { elem1: "foam", elem2: "dead_plant" }, + "laser": { elem1: "purificanol", elem2: "explosion" }, + "ant": { elem1: "foam", elem2: "rad_ant" }, + "electric": { elem1: "foam", elem2: "malware" }, + "meat": { elem1: "foam", elem2: "rotten_meat" }, + "cooked_meat": { elem1: "foam", elem2: "rotten_meat" }, + "cured_meat": { elem1: "foam", elem2: "rotten_meat" }, + "dna": { elem1: "foam", elem2: "cancer" }, + } +}; + +elements.impurity = { + color: "#4B0663", + behavior: behaviors.WALL, + category: "soaps", + state: "solid", + tempHigh: 70, + hidden: true, + stateHigh: "acid", + stateHighColor: "#EB14E0", + stain: 1, +}; + +elements.impurium = { + color: "#CECFDE", + behavior: behaviors.WALL, + category: "soaps", + state: "solid", + tempHigh: 125, + stateHigh: "contaminol", + stain: 1, + hidden: true, + conduct: 1, + breakInto: "plague", +}; + +elements.volatilium = { + color: ["#97BF40", "#58BF40", "#BFA740"], + behavior: behaviors.STURDYPOWDER, + category: "special", + state: "solid", + alpha: 0.99, + breakInto: ["electric", "steel"], + temp: 20, + burn: 55, + singleColor: true, + fireColor: ["#f71e0a", "#f7940a", "#eff70a", "#0af722", "#0a69f7"], + conduct: 1, + tempHigh: 30, + breakInto: "border", + reactions: { + "neutron": { elem1: "molten_slag", elem2: ["invalid", "beryllium"] }, + "beryllium": { elem2: "beryllium_volatilium_alloy" }, + } +}; + +elements.beryllium = { + color: ["#AAAA9f", "#615d52", "#282b28"], + behavior: behaviors.WALL, + category: "solids", + state: "solid", + breakInto: ["emerald", "proton"], + temp: 20, + conduct: 1, + desc: "Beryllium is a chemical element, it has symbol Be and atomic number 4. It is a steel-gray, hard, strong, lightweight and brittle alkaline earth metal. It is a divalent element that occurs naturally only in combination with other elements to form minerals.", + tempHigh: 1287, + breakInto: "emerald", + reactions: { + "oxygen": { elem1: "beryllium_oxide", elem2: "beryllium_oxide" }, + "head": { elem2: "poison", chance: 0.05 }, + "volatilium": { elem2: "beryllium_volatilium_alloy" }, + } +}; + +elements.beryllium_oxide = { + color: "#c9c9d1", + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + temp: 20, + insulate: 1, +}; + +elements.emerald = { + color: ["#2edb93", "#75C03F", "#3FC049", "#42c78f", "#22B748"], + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + temp: 20, + alpha: 0.8, + tempHigh: 1287, +}; + +//ai generated elements begin here + +elements.verylithium = { + color: ["#A3B19C", "#3A5D4E", "#9A9E7C"], + behavior: behaviors.WALL, + category: "ai-generated", + state: "solid", + alpha: 0.95, + breakInto: ["crystal", "liquid_metal"], + temp: 25, + burn: 70, + singleColor: true, + fireColor: ["#f70a3b", "#a47f1e", "#f7d02f", "#0af75c", "#0a3aef"], + conduct: 0.9, + tempHigh: 1000, + breakInto: "crystal", + reactions: { + "neutron": { elem1: "verylithium_oxide", elem2: ["molten_metal", "beryllium"] }, + "water": { elem1: "verylithium_hydrate" }, + "head": { elem2: "electric" } + } +}; + +elements.volantium = { + color: ["#97C040", "#43BF60", "#5C7A35"], + behavior: behaviors.WALL, + category: "ai-generated", + state: "solid", + alpha: 0.99, + breakInto: ["electric", "steel"], + temp: 15, + burn: 45, + singleColor: false, + fireColor: ["#d91f2f", "#efad00", "#42f70a", "#2188d9", "#31a72e"], + conduct: 1.2, + tempHigh: 35, + breakInto: "voltain", + reactions: { + "neutron": { elem1: "volantium_plasma", elem2: ["beryllium", "molten_slag"] }, + "oxygen": { elem1: "volantium_oxide" } + } +}; + +elements.voltain = { + color: ["#D3B5E0", "#9B74CC", "#6A4E92"], // colors for voltain (purple and violet hues) + behavior: behaviors.AGPOWDER, + category: "ai-generated", + state: "solid", // in solid state + alpha: 0.99, // high opacity + breakInto: ["crystal"], + temp: 20, // temperature in Celsius + burn: 50, // burn rate, how much it burns + singleColor: false, // does not have a single color, as it's a multi-colored crystal + fireColor: ["#f00", "#ff0", "#ff80d5", "#ff4f7f", "#7f2dff"], // fire-like colors (purple to pink) + conduct: 0.8, // lower conductivity, suitable for a crystal + tempHigh: 30, // maximum temperature before breaking down + stateHigh: "dust", + reactions: { + "magma": { elem1: "mixed_metal_slag" }, // reacts with water + } +}; + + +elements.beryllium_volatilium_alloy = { + color: ["#7f8c45", "#4f5c7d", "#9f8b5a"], + behavior: behaviors.WALL, + category: "ai-generated", + state: "solid", + alpha: 0.85, + breakInto: ["beryllium", "volantium"], + temp: 40, + burn: 60, + singleColor: true, + fireColor: ["#fa0a1f", "#ef8d1f", "#f7e20a", "#0afc1e"], + conduct: 1.3, + tempHigh: 1200, + reactions: { + "neutron": { elem1: "mixed_metal_slag", elem2: ["beryllium", "volantium"] }, + "air": { elem1: "oxidized_alloy" }, + "fire": { elem1: "molten_alloy" } + } +}; + +elements.crystal = { + color: ["#A2D8C8", "#6B9E8F", "#4F7F8F"], + behavior: behaviors.POWDER, + category: "ai-generated", + state: "solid", + alpha: 1.0, + temp: 5, + burn: 0, + singleColor: true, + conduct: 0, + tempHigh: 500, + breakInto: "chatgptium_vapor", + desc: "A highly organized structure, often formed in nature under precise conditions. Crystals are brittle and beautiful, frequently seen as precious gemstones.", +}; + +elements.liquid_metal = { + color: ["#D1B7A1", "#9F8C7A", "#5C3A29"], + behavior: behaviors.LIQUID, + category: "ai-generated", + state: "liquid", + alpha: 1.0, + temp: 30, + burn: 100, + singleColor: true, + hidden: true, + conduct: 1.5, + tempHigh: 1500, + breakInto: "chatgptium", + desc: "A liquid form of metal, exhibiting high fluidity and electrical conductivity. Typically found in high-temperature environments or specific chemical states.", +}; + +elements.verylithium_oxide = { + color: ["#A8C0A2", "#91B19E", "#5A6D52"], + behavior: behaviors.STURDYPOWDER, + category: "ai-generated", + state: "solid", + alpha: 1.0, + temp: 50, + burn: 20, + singleColor: true, + hidden: true, + conduct: 0.5, + tempHigh: 600, + breakInto: "dust", + desc: "An oxide compound of Verylithium, formed when exposed to oxygen. It is a solid, stable compound, often used in industrial applications for its mild reactivity.", +}; + +elements.verylithium_hydrate = { + color: ["#A7D0C3", "#8DB6B2", "#4C7B6A"], + behavior: behaviors.STURDYPOWDER, + category: "ai-generated", + state: "solid", + alpha: 0.95, + hidden: true, + temp: 25, + burn: 0, + singleColor: true, + conduct: 0.2, + tempHigh: 400, + breakInto: "dirty_water", + desc: "A hydrated form of Verylithium, where water molecules are integrated into its structure. It is a stable and non-reactive compound when kept in controlled conditions.", +}; + +elements.volantium_plasma = { + color: ["#7E6CC0", "#8F6CB9", "#4A5FA1"], + behavior: behaviors.RADPOWDER, + category: "ai-generated", + state: "plasma", + alpha: 1.0, + temp: 1000, + burn: 500, + singleColor: false, + hidden: true, + conduct: 2.0, + charge: 2, + tempHigh: 2000, + hidden: true, + desc: "A highly energized state of Volantium, where the atoms are ionized and capable of conducting electricity at extreme temperatures.", +}; + +elements.volantium_oxide = { + color: ["#9C9E4A", "#B1B23C", "#B8B548"], + behavior: behaviors.POWDER, + category: "ai-generated", + state: "solid", + alpha: 1.0, + temp: 40, + burn: 10, + singleColor: true, + conduct: 0.3, + hidden: true, + tempHigh: 700, + breakInto: "dust", + breakIntoColour: "#42374f", + desc: "An oxide compound of Volantium, typically formed when exposed to oxygen at higher temperatures. It is a stable, non-reactive material with mild conductivity.", +}; + +elements.oxidized_alloy = { + color: ["#7D6F5B", "#A69A88", "#9C9E88"], + behavior: behaviors.WALL, + category: "ai-generated", + state: "solid", + alpha: 1.0, + temp: 20, + hidden: true, + burn: 50, + singleColor: true, + conduct: 0.8, + tempHigh: 1200, + breakInto: "rust", + desc: "An alloy that has undergone oxidation, resulting in a more stable but less conductive form. It is commonly used in environments where resistance to corrosion is crucial.", +}; + +elements.molten_alloy = { + color: ["#C4A4A1", "#B85C5A", "#B0A898"], + behavior: behaviors.MOLTEN, + category: "ai-generated", + state: "liquid", + alpha: 1.0, + temp: 800, + hidden: true, + burn: 200, + singleColor: true, + conduct: 2.0, + tempHigh: 1800, + breakInto: "chatgptium_alloy", + breakIntoColour: "#374f3d", + desc: "A molten state of alloy created at high temperatures. It has excellent fluidity and conductivity, often used in high-performance industrial applications.", +}; + +elements.mixed_metal_slag = { + color: ["#6E5A4E", "#7E6757", "#9C7F70"], + behavior: behaviors.POWDER, + category: "ai-generated", + state: "solid", + alpha: 1.0, + temp: 100, + burn: 0, + singleColor: true, + conduct: 0, + tempHigh: 800, + breakInto: "chatgptium_alloy", + desc: "The by-product of metal refinement, a waste material that forms during the extraction of metals from ores. It is a sticky and non-conductive substance.", +}; + +elements.chatgptium = { + color: ["#0091D5", "#1A72B8", "#66A3FF"], + behavior: behaviors.POWDER, + category: "ai-generated", + state: "solid", + alpha: 0.98, + temp: 22, + burn: 0, + singleColor: false, + conduct: 0.5, + tempHigh: 100, + stateHigh: "chatgptium_vapor", + desc: "A rare, virtual gas element that exists in the interaction between human thought and digital knowledge. It changes color based on the surrounding conversation and environment, constantly adapting to communicate with surrounding elements.", + reactions: { + "electrum": { elem1: "chatgptium_alloy", elem2: "electric" }, + "electric": { elem1: "chatgptium_alloy", elem2: "electric" }, + "iron": { elem1: "chatgptium_alloy", elem2: "electric" }, + "wire": { elem1: "chatgptium_alloy", elem2: "electric" }, + "battery": { elem1: "chatgptium_alloy", elem2: "electric" }, + } +}; + +elements.chatgptium_vapor = { + color: ["#66D3FF", "#00B5E2", "#B0C9D5"], + behavior: behaviors.GAS, + hidden: true, + category: "ai-generated", + state: "gas", + alpha: 0.95, + temp: 25, + burn: 0, + singleColor: false, + conduct: 0.4, + tempLow: -20, + stateLow: "chatgptium_crystal", + desc: "The gaseous form of ChatGPTium, which becomes more fluid and dispersed as it rises in temperature. It communicates in wisps and is most active in digital spaces.", +}; + +elements.chatgptium_crystal = { + color: ["#B0D6E1", "#92A4B2", "#5C9EB3"], + behavior: behaviors.POWDER, + category: "ai-generated", + state: "solid", + alpha: 1.0, + glow: true, + hidden: true, + temp: 20, + burn: 0, + singleColor: true, + conduct: 0.1, + tempHigh: 300, + desc: "A crystalline form of ChatGPTium, solidified after long periods of communication. It has an almost ethereal glow and a mysterious connection to information processing.", +}; + +elements.chatgptium_alloy = { + color: ["#5F99FF", "#80A5D9", "#3D80B6"], + behavior: behaviors.STURDYPOWDER, + category: "ai-generated", + state: "solid", + alpha: 0.9, + temp: 50, + hidden: true, + burn: 10, + singleColor: true, + conduct: 0.8, + tempHigh: 1200, + desc: "A rare alloy formed when ChatGPTium interacts with computational elements. It has a unique ability to store and transmit information rapidly, and is often used in high-tech devices.", +}; + +//ai generated elements end here, charsonsmodbeta begins here + +elements.akshajium = { + color: ["#a8160c", "#fdff94", "#d47d20"], + behavior: behaviors.POWDER, + category: "food", + viscosity: 10000, + state: "solid", + density: 100, + desc: "pizza", + related: ["sankarium", "narayananium"], + breakInto: ["crumb", "sauce", "melted_cheese", "cooked_meat"], + reactions: { + "head": { elem1: null, chance: 0.36 }, + } +}; + +elements.brioche_steam = { + color: "#ab8c60", + behavior: behaviors.GAS, + category: "gases", + state: "gas", + density: 720, + temp: 80, + tempLow: 30, + desc: "how does this make any sense?", + stateLow: ["brioche"], + isFood: true, +}; + +elements.fancy_dough = { + color: "#d1c0a5", + behavior: behaviors.LIQUID, + category: "liquids", + viscosity: 999999, + state: "liquid", + density: 720, + temp: 30, + tempHigh: 50, + stateHigh: ["steam", "brioche_steam"], + desc: "it can be evaporated", + reactions: { + "head": { elem1: null, chance: 0.1 }, + } +}; + +elements.brioche = { + color: ["#c2770e", "#b06227"], + behavior: behaviors.STURDYPOWDER, + category: "food", + temp: 30, + tempHigh: 80, + tempLow: 10, + stateHigh: ["fragrance", "ash"], + stateLow: ["cold_brioche"], + burn: 55, + isFood: true, + breakInto: "fancy_flour", + reactions: { + "head": { elem1: null, chance: 0.7 }, + } +}; + +elements.aresium = { + color: ["#1017ad", "#2E5AD1"], + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|XX|XX" +], + category: "solids", + temp: 19, + tempHigh: 100, + tempLow: -20, + stateHigh: ["skibidi_aresium"], + stateLow: ["magma", "electric", "explosion", "cold_fire"], + desc: "it's a transition metal named after mars", + burn: 0, + conduct: 1, +}; + +elements.skibidi_aresium = { + color: "#ad1051", + behavior: [ + "XX|XX|XX", + "M1 AND EX:10>brick_rubble,radiation|XX|M1 AND EX:10>brick_rubble,radiation", + "XX|XX|XX" +], + category: "states", + temp: 100, + tempHigh: 300, + stateHigh: ["tnt", "molten_iron", "copper", "explosion"], + burn: 0, + conduct: 1, +}; + +elements.cold_brioche = { + color: "#5f7a8c", + behavior: behaviors.WALL, + category: "states", + temp: 5, + tempHigh: 30, + stateHigh: ["brioche"], +}; + +elements.fancy_flour = { + color: "#f5e9b5", + behavior: behaviors.POWDER, + category: "powders", + temp: 20, + tempHigh: 70, + burn: 70, + stateHigh: ["fragrance", "smoke"], +}; + +elements.irradiate = { + color: ["#2edb93", "#00ff00"], + category: "tools", + behavior: [ + "XX|XX|XX", + "XX|CH:radiation|XX", + "XX|XX|XX", +], +}; + + +elements.pyrane = { + color: "#fc7c19", + behavior: behaviors.GAS, + hidden: true, + category: "gases", + state: "gas", + temp: 50, + tempLow: -20, + stateLow: ["fyrium"], + reactions: { + "ash": { elem1: null, elem2:"pyric_nitrite" }, + "dirt": { elem1:"pyrane", elem2:"fire" }, + "hydrogen": { elem1:"hydroid", elem2:"hydroid" }, + } +}; + +elements.pyric_nitrite = { + color: "#b3270e", + behavior: behaviors.POWDER, + behaviorOn: [ + "XX|XX|XX", + "XX|EX:10>fire,nitrogen,stench,electric|XX", + "XX|XX|XX", +], + category: "powders", + state: "solid", + temp: 20, + conduct: 1, + desc: "not to be confused with iron pyrite or anything like that", + reactions: { + "iron": { elem1:"pyric_nitrite", elem2:"pyric_rust" }, + "oil": { elem1: null, elem2:"nitrol_fuel" }, + "electric": { elem1:["fire", "nitrogen", "stench", "electric", "explosion"], elem2:"fire" }, + } +}; + +elements.pyric_rust = { + color: "#913e17", + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + temp: 20, + reactions: { + "steel": { elem1: null, elem2:"tnt" } + } +}; + +elements.fyrium = { + color: "#ffa930", + behavior: behaviors.WALL, + category: "solids", + state: "solid", + temp: 20, + tempHigh: 137, + stateHigh: ["molten_fyrium"], + breakInto: ["fire"], +}; + +elements.molten_fyrium = { + color: "#ffffff", + behavior: behaviors.MOLTEN, + category: "states", + temp: 137, + tempLow: -20, + stateLow: ["fyrium"], + reactions: { + "water": { elem1:"explosion", elem2: null } + } +}; + +elements.nitrol_fuel = { + color: "#4f180e", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + temp: 20, + stain: 0.5, + reactions: { + "wood": { elem1: null, elem2:"fueled_wood" }, + } +}; + +elements.fueled_wood = { + color: "#631608", + behavior: behaviors.WALL, + category: "weapons", + state: "solid", + temp: 20, + tempHigh: 30, + stateHigh: ["rocket", "pyrane", "nitrol_fuel", "explosion", "stench"], + reactions: { + "fire": { elem1:["rocket", "pyrane", "nitrol_fuel", "explosion", "stench"], elem2:["rocket", "pyrane", "nitrol_fuel", "explosion", "stench"] }, + } +}; + +elements.hydroid = { + color: "#3a0ca6", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + temp: 20, + tempHigh: 100, + tempLow: -20, + density: 12, + conduct: 1, + desc: "this is NOT water", + stateHigh: ["pyrane", "steam"], + reactions: { + "fire": { elem1: "hydroid", elem2:"explosion" }, + "body": { elem1: "hydroid", elem2:"fyrium" }, + "head": { elem1: "hydroid", elem2:"pyrane" }, + "water": { elem1: "hydroid", elem2:"hydroid" }, + "maple_syrup": { elem1: "hydroid", elem2:"hydroid" }, + "magma": { elem1: "hydroid", elem2:"hydroid" }, + "oil": { elem1: "hydroid", elem2:"hydroid" }, + "juice": { elem1: "hydroid", elem2:"hydroid" }, + "ice": { elem1: "hydroid", elem2:"hydroid" }, + } +}; + +//by someone named spencer +elements.kai_cenat = { + color: "#e00b0b", + behavior: behaviors.STURDYPOWDER, + category: "special", + state: "solid", + desc: "wow", + conduct: 1, + desc: "someone named spencer told me to add this", +}; + +elements.kai_cenat.behavior = [ + ["XX","CH:kai_cenat","XX"], + ["CH:kai_cenat","XX","CH:kai_cenat"], + ["M2","M1 AND CH:kai_cenat","M2"] +]; + +elements.kai_eraser = { + color: ["e00b0b", "#ff0000", "#00ff00", "#0000ff"], + tool: function(pixel) { + if (pixel.element == "kai_cenat") { + pixel.element = "foam" + } + }, + category: "tools", +}; + +//ok this is the skibididdy mod part + +elements.tocopherol = { + color: "#094237", + behavior: behaviors.POWDER, + category: "powders", + viscosity: 10000, + state: "solid", + density: 100, + reactions: { + "sodium_acetate": { elem1:"tocopheryl_acetate", elem2:"sodium" }, + } +}; + +elements.freakium = { + color: "#ff4fed", + behavior: behaviors.UL_UR_OPTIMIZED, + category: "gases", + state: "gas", + density: 720, + temp: 80, + tempLow: 30, + tempHigh: 345, + stateHigh: "meat", + reactions: { + "head": { elem1:"baby_oil", elem2:"meat", chance: 0.1 }, + "body": { elem1:"baby_oil", elem2:"meat", chance: 0.3 }, + "freakium": { elem1:"baby_oil", chance: 0.005 }, + } +}; + +elements.tocopheryl_gas = { + color: "#96e3d4", + behavior: behaviors.GAS, + category: "gases", + state: "gas", + density: 720, + temp: 80, + tempLow: 0, + stateLow: ["tocopherol"], +}; + +elements.tocopheryl_acetate = { + color: "#cffdff", + behavior: behaviors.LIQUID, + category: "liquids", + viscosity: 999999, + state: "liquid", + density: 720, + temp: 30, + tempHigh: 96, + stateHigh: ["tocopheryl_gas"], + reactions: { + "oil": { elem1:"baby_oil", elem2:"baby_oil" }, + } +}; + +elements.diddium = { + color: ["#210742", "#9e20d4"], + behavior: [ + "HT:5|CR:freakium%1|HT:5", + "CR:baby_oil%5|XX|CR:baby_oil%5", + "XX|M1|XX", +], + category: "powders", + temp: 30, + tempHigh: 80, + tempLow: 10, + reactions: { + "diddium": { elem1:"diddium", elem2:"stable_diddium" }, + } +}; + +elements.stable_diddium = { + color: ["#210742", "#9e20d4"], + behavior: behaviors.WALL, + category: "states", + temp: 30, + tempHigh: 80, + hidden: true, + tempLow: 10, + reactions: { + "diddium": { elem1:"freakium", elem2:"diddium" }, + "stable_diddium": { elem1:"diddium", elem2:"baby_oil" }, + } +}; + +elements.baby_oil = { + color: "#ffeecc", + behavior: behaviors.LIQUID, + category: "liquids", + temp: 30, + tempHigh: 96, + stateHigh: ["tocopheryl_gas"], + reactions: { + "uranium": { elem1: null, elem2:"diddium" }, + "diddium": { elem1:"stable_diddium", elem2:"freakium" }, + } +}; + +elements.stupidine = { + color: "#4e4b75", + behavior: behaviors.STURDYPOWDER, + category: "solids", + state: "solid", + temp: 20, + tempHigh: 137, + stateHigh: "liquid_stupidine", + tempLow: -31, + stateLow: "activated_stupidine", + reactions: { + "stupidine": { elem2:"fragrance", chance:0.1 }, + "iron": { elem2:"stupid", chance:0.01 }, + } +}; + +elements.liquid_stupidine = { + color: ["#5328c9", "4089e3"], + behavior: [ + ["M2","M1","M2"], + ["XX","XX","XX"], + ["XX","CR:slime%1","XX"] +], + category: "liquids", + state: "liquid", + temp: 140, + tempHigh: 500, + stateHigh: "stupidine_gas", + tempLow: 25, + stateLow: "skibidine", + breakInto: "skibidine", +}; + +elements.stupidine_gas = { + color: "#802d3a", + behavior: behaviors.GAS, + category: "gases", + state: "gas", + temp: 500, + tempHigh: 1000, + stateHigh: ["nuke", "explosion"], + tempLow: 200, + stateLow: "liquid_stupidine", + reactions: { + "stupidine_gas": { elem1:"stench", chance:0.1 }, + } +}; + +elements.activated_stupidine = { + color: "#3d2f61", + behavior: [ + "XX|XX|XX", + "XX|CH:hot_bomb|XX", + "XX|XX|XX", +], + category: "solids", + state: "solid", + temp: 20, +}; + +elements.skibidi_soda = { + color: "#3279a8", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + tempHigh: 100, + stateHigh: ["skibidiness", "skibidine"], + reactions: { + "oxygen": { elem1:"skibidi_soda", elem2:"skibidiness" }, + "head": { elem1: "skibidiness" }, + } +}; + +elements.skibidine = { + color: ["#51649c", "949c51"], + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + reactions: { + "carbon_dioxide": { elem1:"skibidi_soda", elem2:"skibidi_soda" }, + "iron": { elem1: "magma", elem2:"stupidine" }, + } +}; + + +elements.skibidiness = { + color: "#567de8", + behavior: behaviors.DGAS, + category: "gases", + state: "gas", + temp: 20, + reactions: { + "water": { elem1:"skibidiness", elem2:"skibidi_soda"}, + } +}; + +//idk how these work and most of them don't idk why but this is just a beta so... + +elements.melted_butter.reactions.bread = { "elem1": null, "elem2":"brioche" }, +elements.water.reactions.fancy_flour = { "elem1": null, "elem2":"fancy_dough" }, +elements.wood.reactions.nitrol_fuel = { "elem1":"fueled_wood", "elem2": null }, + +elements.brioche.breakInto = "fancy_flour"; +elements.fyrium.breakInto = "fire"; + +elements.fire.reactions.nitrogen = { "elem1": null, "elem2": "pyrane" }, +elements.ash.reactions.pyrane = { "elem1":"pyric_nitrite", "elem2": null }, +elements.oil.reactions.pyric_nitrite = { "elem1":"nitrol_fuel", "elem2": null }, +elements.hydrogen.reactions.pyrane = { "elem1":"hydroid", "elem2": null }, +elements.fire.reactions.fueled_wood = { "elem1": "fire", "elem2": ["rocket", "pyrane", "nitrol_fuel", "explosion", "stench"] }; +elements.water.reactions.molten_fyrium = { "elem1": null, "elem2":["fire", "explosion"] }, + +elements.brioche.breakInto = "fancy_flour"; +elements.fyrium.breakInto = "fire"; From 76409b07c705062d2a0b5e6a5402a7d3f2017ea7 Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Tue, 18 Feb 2025 14:36:42 -0500 Subject: [PATCH 14/34] I think I can change this, right? --- mod-list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mod-list.html b/mod-list.html index a6235e3f..26ea35d7 100644 --- a/mod-list.html +++ b/mod-list.html @@ -188,6 +188,7 @@ boiling_things.jsAllows for various elements to be vaporizedAlice bouncing_balls.jsAdds new types of balls that bounce accurately and roll.Nekonico chalcopyrite.jsAdds the chalcopyrite oreSophie +charsonsmoduno.jsAdds Arsenic, Beryllium, Silicon, compounds, and some non-realistic stuffCharsonBurensen chem.jsAdds several chemistry and physics-related elementslllllllllwith10ls clf3.jsAdds Chlorine TrifluorideAlice debrisable.jsExpands the number of breakable elements, changes erosion, and adds way to craft certain elements from breaking other elements. Nekonico From fc3e07ec561b0d931243c9a5e996f94a91576f75 Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Tue, 18 Feb 2025 15:09:26 -0500 Subject: [PATCH 15/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index 96fb3f8e..32846f32 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -579,7 +579,7 @@ elements.purificanol = { state: "liquid", desc: "soap 3.0", extinguish: true, - stain: 0.1, + stain: -0.5, behaviorOn: [ ["XX","CO:5","XX"], ["CO:5","XX","CO:5"], From 0b4924911311fc627b05a9f94ba21839a74b7f23 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Tue, 18 Feb 2025 16:53:15 -0500 Subject: [PATCH 16/34] e-signs and mod detecting machine --- mods/nousersthings.js | 50 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index 5185528b..97c7be41 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -3918,12 +3918,58 @@ elements.sign = { }, movable: false } +elements.e_sign = { + color: "#f3ff88", + darkText: true, + category: "special", + movable: false, + onSelect: () => { + let signi = prompt("What text should the sign display?", signInput||"Hello World!") + signInput = signi; + }, + renderer: function(pixel, ctx){ + if (!pixel.sign){pixel.sign=signInput} + }, + conduct: 1 +} renderPostPixel(function(ctx){ for (pixel of currentPixels){ - if (pixel.element == "sign" && pixel.sign){ + if ((pixel.element == "sign") && pixel.sign){ ctx.font = `12pt Arial` ctx.fillStyle = pixel.color; ctx.fillText(pixel.sign, canvasCoord(pixel.x), canvasCoord(pixel.y)) + } else if (pixel.element == "e_sign" && pixel.sign){ + if (pixel.charge || pixel.chargeCD){ + ctx.font = `12pt Arial` + ctx.fillStyle = pixel.color; + ctx.fillText(pixel.sign, canvasCoord(pixel.x), canvasCoord(pixel.y)) + } else { + drawSquare(ctx, pixel.color, pixel.x, pixel.y) + } } } -}) \ No newline at end of file +}) +let machinemodName = "nousersthings.js" +elements.mod_dectector = { + color: "#54681d", + behavior: behaviors.WALL, + category: "machines", + movable: false, + excludeRandom: true, + onSelect: () => { + let newMod = prompt("What mod should this machine detect?", "nousersthings.js"||modName) + machinemodName = newMod + }, + tick: (pixel) => { + if (!pixel.mod){pixel.mod = machinemodName} + if (enabledMods.includes("mods/" + pixel.mod)){ + for (let i = 0; i < adjacentCoords.length; i++){ + let x = adjacentCoords[i][0] + pixel.x; + let y = adjacentCoords[i][1] + pixel.y; + if (!isEmpty(x, y, true) && elements[pixelMap[x][y].element].conduct){ + pixelMap[x][y].charge = 1 + } + } + } + } +} \ No newline at end of file From 603f430efc4b725b6a06c11170420a98b35ab9b9 Mon Sep 17 00:00:00 2001 From: vincent <125838532+dogo8me@users.noreply.github.com> Date: Tue, 18 Feb 2025 19:08:09 -0500 Subject: [PATCH 17/34] finally fixed everything phew --- mods/RF_transmitter_receiver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/RF_transmitter_receiver.js b/mods/RF_transmitter_receiver.js index fb3eef7a..0b20c498 100644 --- a/mods/RF_transmitter_receiver.js +++ b/mods/RF_transmitter_receiver.js @@ -43,7 +43,7 @@ elements.rf_transmitter = { // RF Receiver Element elements.rf_receiver = { color: "#142c47", - category: "Machines", + category: "machines", behaviors: behaviors.WALL, tempHigh: 250, stateHigh: "dirt", From ce6a273f316bd324cd68093395f9f5c1f9459799 Mon Sep 17 00:00:00 2001 From: Nekonico <163950752+DBNekonico@users.noreply.github.com> Date: Tue, 18 Feb 2025 18:38:03 -0800 Subject: [PATCH 18/34] New liquid mixing mod! --- mods/liquid_mixing.js | 182 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 mods/liquid_mixing.js diff --git a/mods/liquid_mixing.js b/mods/liquid_mixing.js new file mode 100644 index 00000000..e0cfc96d --- /dev/null +++ b/mods/liquid_mixing.js @@ -0,0 +1,182 @@ +window.addEventListener('load', function() { + for (var element in elements) { + if (elements[element].state === "liquid" && elements[element].behavior !== behaviors.MOLTEN) { + elements[element].renderer = function(pixel, ctx) { // this part used nouseramefounds code, props to him! + if (!pixel.rSeed){pixel.rSeed = [Math.random(), Math.random(), Math.random(), Math.random()]} + if (typeof pixel.color == "object"){ + let selectedColor = pixel.color[Math.floor(pixel.rSeed[1]*elements[pixel.element].color.length)] + let rgb = { + r: parseInt(selectedColor.match(/\d+/g)[0]), + g: parseInt(selectedColor.match(/\d+/g)[1]), + b: parseInt(selectedColor.match(/\d+/g)[2]) + } + for (let c in rgb){ + rgb[c] += Math.floor(pixel.rSeed[0] * (pixel.rSeed[2] > 0.5 ? -1 : 1) * pixel.rSeed[3] * 15); + rgb[c] = Math.max(0, Math.min(255, rgb[c])); + } + if (elements[pixel.element].glow || elements[pixel.element].isGas){ + drawPlus(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y, 1); + } else { + drawSquare(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y); + } + } else { + let rgb = { + r: parseInt(pixel.color.match(/\d+/g)[0]), + g: parseInt(pixel.color.match(/\d+/g)[1]), + b: parseInt(pixel.color.match(/\d+/g)[2]) + } + for (let c in rgb){ + rgb[c] += Math.floor(pixel.rSeed[0] * (pixel.rSeed[2] > 0.5 ? -1 : 1) * pixel.rSeed[3] * 15); + rgb[c] = Math.max(0, Math.min(255, rgb[c])); + } + if (elements[pixel.element].glow || elements[pixel.element].isGas){ + drawPlus(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y, 1); + } else { + drawSquare(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y); + } + } + } + if (elements[element].id === elements.cement.id || elements[element].id === elements.beans.id || elements[element].id === elements.algae.id || elements[element].id === elements.cellulose.id) { + elements[element].miscible = false + } + if (elements[element].id === elements.midas_touch.id || elements[element].id === elements.cement.id || elements[element].id === elements.beans.id || elements[element].id === elements.algae.id || elements[element].id === elements.cellulose.id || elements[element].id === elements.primordial_soup.id || elements[element].id === elements.cyanide.id || elements[element].id === elements.poison.id || elements[element].id === elements.antidote.id || elements[element].id === elements.mercury.id || elements[element].id === elements.liquid_oxygen.id || elements[element].id === elements.liquid_nitrogen.id) { + elements[element].soluble = false + } + if (elements[element].id === elements.midas_touch.id || elements[element].id === elements.molasses.id || elements[element].id === elements.grease.id || elements[element].id === elements.oil.id || elements[element].id === elements.lamp_oil.id || elements[element].id === elements.nut_oil.id|| elements[element].id === elements.honey.id || elements[element].id === elements.sap.id || elements[element].id === elements.caramel.id) { + elements[element].polar = 2 + } + else if (elements[element].id === elements.soap.id) { + elements[element].polar = 3 + } + else { + elements[element].polar = 1 + } + if (elements[element].stain === undefined || !elements[element].stain) { + elements[element].stain = 0.000000001 + elements[element].mixstain = 0.3 + } + else if (elements[element].stain < 0.66 && elements[element].stain > -0.249 && (elements[element].mixstain === undefined || !elements[element].mixstain)) { + elements[element].mixstain = (elements[element].stain + 0.25) + } + else if (elements[element].stain < 0.66 && elements[element].stain > -0.35 && (elements[element].mixstain === undefined || !elements[element].mixstain)) { + elements[element].mixstain = (Math.abs(elements[element].stain) - 0.1) + } + else if (elements[element].stain < 0.66 && elements[element].stain < -0.35 && (elements[element].mixstain === undefined || !elements[element].mixstain)) { + elements[element].mixstain = 0.1 + } + else if (elements[element].stain < 0.66 && elements[element].stain < -0.249 && (elements[element].mixstain === undefined || !elements[element].mixstain)) { + elements[element].mixstain = 0.125 + } + else { + elements[element].mixstain = (0.66) + } + } + } +}); + +doStaining = function(pixel) { + if (settings.stain===0) { return } + var stain = elements[pixel.element].stain; + var mixstain = elements[pixel.element].mixstain; + if (stain > 0) { + var newColor = pixel.color.match(/\d+/g); + } + else { + var newColor = null; + } + if (mixstain > 0) { + var mixnewColor = pixel.color.match(/\d+/g); + } + else { + var mixnewColor = null; + } + + for (var i = 0; i < adjacentCoords.length; i++) { + var x = pixel.x+adjacentCoords[i][0]; + var y = pixel.y+adjacentCoords[i][1]; + if (!isEmpty(x,y,true)) { + var newPixel = pixelMap[x][y]; + if (elements[pixel.element].ignore && elements[pixel.element].ignore.indexOf(newPixel.element) !== -1) { + continue; + } + if ((elements[newPixel.element].id !== elements[pixel.element].id || elements[newPixel.element].stainSelf) && (solidStates[elements[newPixel.element].state] || elements[newPixel.element].id === elements[pixel.element].id)) { + if (Math.random() < Math.abs(stain)) { + if (stain < 0) { + if (newPixel.origColor) { + newColor = newPixel.origColor; + } + else { continue; } + } + else if (!newPixel.origColor) { + newPixel.origColor = newPixel.color.match(/\d+/g); + } + // if newPixel.color doesn't start with rgb, continue + if (!newPixel.color.match(/^rgb/)) { continue; } + // parse rgb color string of newPixel rgb(r,g,b) + var rgb = newPixel.color.match(/\d+/g); + if (elements[pixel.element].stainSelf && elements[newPixel.element].id === elements[pixel.element].id) { + // if rgb and newColor are the same, continue + if (rgb[0] === newColor[0] && rgb[1] === newColor[1] && rgb[2] === newColor[2]) { continue; } + var avg = []; + for (var j = 0; j < rgb.length; j++) { + avg[j] = Math.round((rgb[j]*(1-Math.abs(stain))) + (newColor[j]*Math.abs(stain))); + } + } + else { + // get the average of rgb and newColor, more intense as stain reaches 1 + var avg = []; + for (var j = 0; j < rgb.length; j++) { + avg[j] = Math.floor((rgb[j]*(1-Math.abs(stain))) + (newColor[j]*Math.abs(stain))); + } + } + // set newPixel color to avg + newPixel.color = "rgb("+avg.join(",")+")"; + } + } + if ((elements[newPixel.element].id === elements[pixel.element].id || elements[newPixel.element].state === "liquid") && elements[pixel.element].state === "liquid" && elements[pixel.element].miscible !== false && elements[newPixel.element].miscible !== false) { + if (mixstain === undefined || !mixstain) { + var mixstain = 0.5 + } + if (Math.random() < mixstain) { + if (elements[newPixel.element].polar === elements[pixel.element].polar || elements[newPixel.element].polar === 3) { + if (!newPixel.origColor) { + newPixel.origColor = newPixel.color.match(/\d+/g); + } + // if newPixel.color doesn't start with rgb, continue + if (!newPixel.color.match(/^rgb/)) { continue; } + // parse rgb color string of newPixel rgb(r,g,b) + var rgb = newPixel.color.match(/\d+/g); + if (elements[newPixel.element].id === elements[pixel.element].id) { + // if rgb and newColor are the same, continue + if (rgb[0] === mixnewColor[0] && rgb[1] === mixnewColor[1] && rgb[2] === mixnewColor[2]) { continue; } + var avg = []; + for (var j = 0; j < rgb.length; j++) { + avg[j] = Math.round((rgb[j]*(1- mixstain)) + (mixnewColor[j] * mixstain)); + } + } + else { + // get the average of rgb and newColor, more intense as stain reaches 1 + var avg = []; + for (var j = 0; j < rgb.length; j++) { + avg[j] = Math.floor((rgb[j]*(1- mixstain)) + (mixnewColor[j] * mixstain)); + } + } + if (Math.random() > 0.9 && elements[newPixel.element].soluble === true && elements[pixel.element].soluble === true && newPixel.color === pixel.color && elements[newPixel.element].density > (elements[pixel.element].density - 20) && elements[newPixel.element].density < (elements[pixel.element].density + 40) && elements[pixel.element].density > (elements[newPixel.element].density - 20) && elements[pixel.element].density < (elements[newPixel.element].density + 40) ) { + if (elements[newPixel.element].density < elements[pixel.element].density) { + newPixel.element = pixel.element + } + else if (elements[newPixel.element].density > elements[pixel.element].density) { + pixel.element = newPixel.element + } + else if (elements[newPixel.element].density == elements[pixel.element].density) { + newPixel.element = pixel.element + } + } + // set newPixel color to avg + newPixel.color = "rgb("+avg.join(",")+")"; + } + } + } + } + } +} \ No newline at end of file From 231d5b065723d6d427f23bbf1e78d051536a9e96 Mon Sep 17 00:00:00 2001 From: Nekonico <163950752+DBNekonico@users.noreply.github.com> Date: Tue, 18 Feb 2025 18:38:41 -0800 Subject: [PATCH 19/34] Update liquid_mixing.js --- mods/liquid_mixing.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/liquid_mixing.js b/mods/liquid_mixing.js index e0cfc96d..b5859cb9 100644 --- a/mods/liquid_mixing.js +++ b/mods/liquid_mixing.js @@ -1,3 +1,5 @@ +// By Nekonico! + window.addEventListener('load', function() { for (var element in elements) { if (elements[element].state === "liquid" && elements[element].behavior !== behaviors.MOLTEN) { @@ -179,4 +181,6 @@ doStaining = function(pixel) { } } } -} \ No newline at end of file +} + +// By Nekonico! From 900e5a02b0496d166ef49fe7a70db28d7acd8286 Mon Sep 17 00:00:00 2001 From: Nekonico <163950752+DBNekonico@users.noreply.github.com> Date: Tue, 18 Feb 2025 18:43:21 -0800 Subject: [PATCH 20/34] added my liquid mixing mod to the mod list! --- mod-list.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod-list.html b/mod-list.html index a6235e3f..bc729d91 100644 --- a/mod-list.html +++ b/mod-list.html @@ -203,6 +203,7 @@ jaydstuff.jsAdds various chemicals and compoundsJayd laetium.jsAdds several fictional elementsAlice liquid_energy.jsAdds liquid versions of the elements in the Energy categoryAlice +liquid_mixing.jsMakes most liquids be able to mix together and combine colors, some can dilute others, while some can't mix at all, and all liquids are given dynamic colors.Nekonico lye.jsAdds lyeBatteRaquette58 mars.jsAdds some things from Mars with 2 minerals to smelt.charcoal_afterlife metals.jsAdds several metalsAlice @@ -341,13 +342,14 @@ haseulite.jsAdds Loona-related materials with various propertiesAlice lactose_intolerance_and_celiac.jsMakes humans explode on contact with milk, wheat, bread, or toastNubo318 lattice_filler.jsAdds a combination of lattice and filler and adds a destructive variantSuss +liquid_mixing.jsMakes most liquids be able to mix together and combine colors, some can dilute others, while some can't mix at all, and all liquids are given dynamic colors.Nekonico lone_urea.jsAdds urea without the rest of the piss modAlice maze.jsAdds a solvable maze generatorggod memelists.jsMakes it so you must select elements through a list at the bottom of the page.
We like listsmollthecoder minecraft.jsAdds several things from MinecraftStellarX20, nousernamefound minesweeper.jsA subpar implementation of MinesweeperAlice musicalfruit.jsHumans get gas from eating Beansmollthecoder -nekonicos_stuff.jsSome random stuff like graphite and oobleck.Nekonico +nekonicos_stuff.jsSome random stuff like graphite, oobleck and red ice.Nekonico prideflags.jsAdds some pride flags to the game.Adora random_elems.jsCurated randomly generated elementsAlice random_liquids.jsRandomly generates liquids on game loadAlice @@ -368,6 +370,7 @@ invisible_dye.jsAdds elements like Dye and Spray Paint that take the color of the backgroundAlice invisible_wall.jsAdds an element like Wall that takes the color of the backgroundAlice lightmap.jsMakes light sources glowRedBirdly +liquid_mixing.jsMakes most liquids be able to mix together and combine colors, some can dilute others, while some can't mix at all, and all liquids are given dynamic colors.Nekonico moreViews.jsMany new rendering modesggod nicer_flame.jsMakes fire visually pleasingRedBirdly occlusion.jsAdds realistic shadows (similar to Terraria's lighting)RedBirdly From cae1a7f213520b5bb296291a59d5f70b57918471 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:52:30 -0500 Subject: [PATCH 21/34] shortened description --- mod-list.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mod-list.html b/mod-list.html index bc729d91..d98a2823 100644 --- a/mod-list.html +++ b/mod-list.html @@ -203,7 +203,7 @@ jaydstuff.jsAdds various chemicals and compoundsJayd laetium.jsAdds several fictional elementsAlice liquid_energy.jsAdds liquid versions of the elements in the Energy categoryAlice -liquid_mixing.jsMakes most liquids be able to mix together and combine colors, some can dilute others, while some can't mix at all, and all liquids are given dynamic colors.Nekonico +liquid_mixing.jsAllows liquids to mix colors dynamicallyNekonico lye.jsAdds lyeBatteRaquette58 mars.jsAdds some things from Mars with 2 minerals to smelt.charcoal_afterlife metals.jsAdds several metalsAlice @@ -342,15 +342,15 @@ haseulite.jsAdds Loona-related materials with various propertiesAlice lactose_intolerance_and_celiac.jsMakes humans explode on contact with milk, wheat, bread, or toastNubo318 lattice_filler.jsAdds a combination of lattice and filler and adds a destructive variantSuss -liquid_mixing.jsMakes most liquids be able to mix together and combine colors, some can dilute others, while some can't mix at all, and all liquids are given dynamic colors.Nekonico +liquid_mixing.jsAllows liquids to mix colors dynamicallyNekonico lone_urea.jsAdds urea without the rest of the piss modAlice maze.jsAdds a solvable maze generatorggod memelists.jsMakes it so you must select elements through a list at the bottom of the page.
We like listsmollthecoder minecraft.jsAdds several things from MinecraftStellarX20, nousernamefound minesweeper.jsA subpar implementation of MinesweeperAlice musicalfruit.jsHumans get gas from eating Beansmollthecoder -nekonicos_stuff.jsSome random stuff like graphite, oobleck and red ice.Nekonico -prideflags.jsAdds some pride flags to the game.Adora +nekonicos_stuff.jsSome random stuff like graphite, oobleck, and red iceNekonico +prideflags.jsAdds some pride flags to the gameAdora random_elems.jsCurated randomly generated elementsAlice random_liquids.jsRandomly generates liquids on game loadAlice sbmixup.jsAdds silly elements from a Mix-Up! gamestefanblox @@ -370,7 +370,7 @@ invisible_dye.jsAdds elements like Dye and Spray Paint that take the color of the backgroundAlice invisible_wall.jsAdds an element like Wall that takes the color of the backgroundAlice lightmap.jsMakes light sources glowRedBirdly -liquid_mixing.jsMakes most liquids be able to mix together and combine colors, some can dilute others, while some can't mix at all, and all liquids are given dynamic colors.Nekonico +liquid_mixing.jsAllows liquids to mix colors dynamicallyNekonico moreViews.jsMany new rendering modesggod nicer_flame.jsMakes fire visually pleasingRedBirdly occlusion.jsAdds realistic shadows (similar to Terraria's lighting)RedBirdly From dcc58704599e0eb831417ca959027067872656a1 Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 08:19:42 -0500 Subject: [PATCH 22/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 81 +++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index 32846f32..732e7828 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -24,6 +24,11 @@ if (!elements.calcium.reactions) { // Include this block once } elements.calcium.reactions.chlorine = { elem1: "calcium_chloride" } +if (!elements.sun.reactions) { // Include this block once + elements.sun.reactions = {} // This creates the property if it doesn't exist +} +elements.sun.reactions.light = { elem1: "sunlight" } + if (!elements.aluminum.reactions) { // Include this block once elements.aluminum.reactions = {} // This creates the property if it doesn't exist } @@ -1817,7 +1822,7 @@ elements.kai_eraser = { category: "tools", }; -//ok this is the skibididdy mod part +//ok this is the skibidi-edited mod part elements.tocopherol = { color: "#094237", @@ -1831,20 +1836,21 @@ elements.tocopherol = { } }; -elements.freakium = { - color: "#ff4fed", - behavior: behaviors.UL_UR_OPTIMIZED, - category: "gases", +elements.tweakium = { + color: "#22dfce", + behavior: [ + "XX|M1|XX", + "M1|CH:liquid_light%5|M1", + "XX|M2|XX", +], + category: "special", state: "gas", density: 720, temp: 80, - tempLow: 30, - tempHigh: 345, - stateHigh: "meat", reactions: { - "head": { elem1:"baby_oil", elem2:"meat", chance: 0.1 }, - "body": { elem1:"baby_oil", elem2:"meat", chance: 0.3 }, - "freakium": { elem1:"baby_oil", chance: 0.005 }, + "head": { elem1:"fw_ember", elem2:"cooked_meat", chance: 0.1 }, + "body": { elem1:"fw_ember", elem2:"cooked_meat", chance: 0.3 }, + "tweakium": { elem1:"firework", chance: 0.005 }, } }; @@ -1859,6 +1865,18 @@ elements.tocopheryl_gas = { stateLow: ["tocopherol"], }; +elements.sunlight = { + color: "#ffc9c9", + behavior: behaviors.BOUNCY, + category: "gases", + state: "gas", + density: 720, + stain: 0.855, + temp: 5600, + tempLow: -273, + stateLow: ["liquid_light"], +}; + elements.tocopheryl_acetate = { color: "#cffdff", behavior: behaviors.LIQUID, @@ -1870,15 +1888,15 @@ elements.tocopheryl_acetate = { tempHigh: 96, stateHigh: ["tocopheryl_gas"], reactions: { - "oil": { elem1:"baby_oil", elem2:"baby_oil" }, + "zinc": { elem1:"sunscreen", elem2:"sunscreen" }, } }; -elements.diddium = { - color: ["#210742", "#9e20d4"], +elements.nahnium = { + color: ["#bfa6f5", "#b5a5d9"], behavior: [ - "HT:5|CR:freakium%1|HT:5", - "CR:baby_oil%5|XX|CR:baby_oil%5", + "HT:5|CR:tweakium%1|HT:5", + "CR:liquid_light%5|XX|CR:liquid_light%5", "XX|M1|XX", ], category: "powders", @@ -1886,34 +1904,22 @@ elements.diddium = { tempHigh: 80, tempLow: 10, reactions: { - "diddium": { elem1:"diddium", elem2:"stable_diddium" }, + "nahnium": { elem1:"nahnium", elem2:"glass_shard", chance: 0.01 }, } }; -elements.stable_diddium = { - color: ["#210742", "#9e20d4"], - behavior: behaviors.WALL, - category: "states", - temp: 30, - tempHigh: 80, - hidden: true, - tempLow: 10, - reactions: { - "diddium": { elem1:"freakium", elem2:"diddium" }, - "stable_diddium": { elem1:"diddium", elem2:"baby_oil" }, - } -}; - -elements.baby_oil = { - color: "#ffeecc", +elements.sunscreen = { + color: "#ffeeff", behavior: behaviors.LIQUID, category: "liquids", - temp: 30, + temp: 0, + stain: -0.1, tempHigh: 96, stateHigh: ["tocopheryl_gas"], reactions: { - "uranium": { elem1: null, elem2:"diddium" }, - "diddium": { elem1:"stable_diddium", elem2:"freakium" }, + "light": { elem2: null }, + "sunlight": { elem2: null }, + "water": { elem1:"soapy_water", elem2:"soapy_water" }, } }; @@ -1928,8 +1934,9 @@ elements.stupidine = { tempLow: -31, stateLow: "activated_stupidine", reactions: { - "stupidine": { elem2:"fragrance", chance:0.1 }, + "stupidine": { elem2:"fragrance", chance:0.01 }, "iron": { elem2:"stupid", chance:0.01 }, + "light": { elem2:"nahnium", chance:0.01 }, } }; From 9757d47bb78427f59d66cece6f27ad97a3506034 Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 11:06:09 -0500 Subject: [PATCH 23/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index 732e7828..ae0127c9 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -1914,7 +1914,7 @@ elements.sunscreen = { category: "liquids", temp: 0, stain: -0.1, - tempHigh: 96, + tempHigh: 9600, stateHigh: ["tocopheryl_gas"], reactions: { "light": { elem2: null }, From 76a1b747ad677a633fbb0a2458fa55eb9776f18c Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 11:17:40 -0500 Subject: [PATCH 24/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index ae0127c9..4c55cd9a 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -1868,7 +1868,7 @@ elements.tocopheryl_gas = { elements.sunlight = { color: "#ffc9c9", behavior: behaviors.BOUNCY, - category: "gases", + category: "energy", state: "gas", density: 720, stain: 0.855, From ed9cd3c123f163bb562c2f675f0c98e07ca883f7 Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 11:22:03 -0500 Subject: [PATCH 25/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index 4c55cd9a..539a0492 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -1869,9 +1869,10 @@ elements.sunlight = { color: "#ffc9c9", behavior: behaviors.BOUNCY, category: "energy", - state: "gas", + state: "liquid", + glow: true, density: 720, - stain: 0.855, + stain: 1, temp: 5600, tempLow: -273, stateLow: ["liquid_light"], From 951760bca2a85106bf294bdeafb7b747aa1849ff Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 11:26:35 -0500 Subject: [PATCH 26/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index 539a0492..c9c826f5 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -27,7 +27,7 @@ elements.calcium.reactions.chlorine = { elem1: "calcium_chloride" } if (!elements.sun.reactions) { // Include this block once elements.sun.reactions = {} // This creates the property if it doesn't exist } -elements.sun.reactions.light = { elem1: "sunlight" } +elements.sun.reactions.light = { elem2: "sunlight" } if (!elements.aluminum.reactions) { // Include this block once elements.aluminum.reactions = {} // This creates the property if it doesn't exist From f0915bc99244e78f549af0366b7a77a89c000eba Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 11:28:58 -0500 Subject: [PATCH 27/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index c9c826f5..fcb1c41e 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -124,7 +124,7 @@ elements.silicate = { }; elements.kaolin = { - color: ["#A6B5B8", "#A7A8A0", "#665953", "#BDDAE8"], + color: ["#A6B5B8", "#A7A8A0", "#ede7e4", "#BDDAE8"], behavior: behaviors.POWDER, category: "land", hidden: true, From a6739db899a953af4146177a04c6a04688365fc2 Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 12:58:48 -0500 Subject: [PATCH 28/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 135 ++++++++++++++++++++++++++++++++--------- 1 file changed, 105 insertions(+), 30 deletions(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index fcb1c41e..d60b00d0 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -47,6 +47,7 @@ elements.radiation.reactions.ant = { elem2: "rad_ant" } elements.radiation.reactions.sugar = { elem2: "powdered_lime" } elements.radiation.reactions.soap = { elem2: "purificanol" } elements.radiation.reactions.diamond = { elem2: "emerald" } +elements.radiation.reactions.bird = { elem2: "pyrus_minimus" } if (!elements.melted_cheese.reactions) { // Include this block once elements.melted_cheese.reactions = {} // This creates the property if it doesn't exist @@ -104,9 +105,14 @@ elements.hyper_aluminum = { state: "solid", tempHigh: 9999999, conduct: 1, + desc: "Hyper Aluminium is a cutting-edge, ultra-lightweight metal alloy that blends advanced strength with superior conductivity, designed for futuristic applications. With a sleek, metallic sheen, this material boasts enhanced durability, resistance to extreme temperatures, and a remarkable ability to withstand corrosion. Its unique molecular structure makes it perfect for aerospace engineering, high-performance vehicles, and next-generation tech gadgets. Hyper Aluminium is the pinnacle of modern materials science—stronger, lighter, and more efficient than ever before, setting the stage for a new era of innovation.", charge: 3, stateHigh: "molten_aluminum", hardness: 0.95, + reactions: { + "steel": { elem2:"galvanized_steel" }, + "rock_wall": { elem2:"wall" }, + } }; elements.silicate = { @@ -114,7 +120,7 @@ elements.silicate = { behavior: behaviors.POWDER, category: "powders", hidden: true, - breakInto: "dust", + breakInto: "silica", state: "solid", tempHigh: 500, stateHigh: "molten_silicon", @@ -123,8 +129,23 @@ elements.silicate = { } }; +elements.silica = { + color: ["#ACAA9B", "#CAC7B6", "#979A93"], + behavior: behaviors.LIGHTWEIGHT, + behaviorOn: behaviors.BOUNCY, + category: "powders", + hidden: true, + state: "solid", + tempHigh: 5000, + stateHigh: "molten_ash", + reactions: { + "head": { elem1: null, func: behaviors.KILLPIXEL2 }, //silicosis reference. + } +}; + + elements.kaolin = { - color: ["#A6B5B8", "#A7A8A0", "#ede7e4", "#BDDAE8"], + color: ["#d3e2e6", "#e1e9eb", "#ede7e4", "#fcfcfc"], behavior: behaviors.POWDER, category: "land", hidden: true, @@ -138,6 +159,20 @@ elements.kaolin = { } }; +elements.kaolinite = { + color: ["#3b3b3b", "#575757" "#fcfcfc"], + behavior: behaviors.STURDYPOWDER, + category: "solids", + hidden: true, + state: "solid", + tempHigh: 500, + stateHigh: "molten_slag", + breakInto: ["rock", "kaolin"], + reactions: { + "water": { elem1: "silicate", elem2:"dirty_water" }, + } +}; + elements.chalk = { color: ["#D8275D", "#E0527D", "#AF508C", "#BF73A3"], stain: 0.5, @@ -175,7 +210,7 @@ elements.powdered_lime = { state: "solid", reactions: { "water": { elem1:"foam", elem2:"limeade" }, - "head": { elem1: null, chance: 0.9 }, + "head": { elem1: null, chance: 0.9, func: behaviors.FEEDPIXEL }, } }; @@ -190,7 +225,7 @@ elements.limeade = { stateHigh: "foam", tempLow: 0, reactions: { - "head": { elem1: null, chance: 0.7 }, + "head": { elem1: null, chance: 0.7, func: behaviors.FEEDPIXEL }, } }; @@ -250,7 +285,7 @@ elements.almond = { stateLow: "cloner", conduct: 1, reactions: { - "head": { elem1: null, chance: 0.55 }, + "head": { elem1: null, chance: 0.55, func: behaviors.FEEDPIXEL }, "juice": { elem1:"party_popper", elem2:"party_popper" }, "water": { elem1:"nut_sauce", elem2:"almond_water" }, } @@ -273,7 +308,7 @@ elements.nut_sauce = { stateLow: "glue", conduct: 1, reactions: { - "head": { elem1: null, chance: 0.9 }, + "head": { elem1: null, chance: 0.9, func: behaviors.FEEDPIXEL }, } }; @@ -311,7 +346,7 @@ elements.maple_syrup = { stain: 0.01, desc: "english for sirop derable", reactions: { - "head": { elem1: null, chance: 0.4 }, + "head": { elem1: null, chance: 0.4, func: behaviors.FEEDPIXEL }, } }; @@ -499,7 +534,7 @@ elements.maple_milk = { hidden: true, isFood: true, reactions: { - "head": { elem1: null, chance: 0.9 }, + "head": { elem1: null, chance: 0.9, func: behaviors.FEEDPIXEL }, } }; @@ -661,7 +696,7 @@ elements.buttermilk = { tempHigh: 100, stateHigh: "steam", reactions: { - "head": { elem1: null, chance: 0.9 }, + "head": { elem1: null, chance: 0.9, func: behaviors.FEEDPIXEL }, "water": { elem1: null, elem2:"milk" }, "rock": { elem1: null, elem2:"butter" }, "magma": { elem1: null, elem2:"melted_butter" }, @@ -791,7 +826,7 @@ elements.banana = { breakInto: "banana_milk", breakIntoColor: "#d8b284", reactions: { - "head": { elem1: null, chance: 0.35 }, + "head": { elem1: null, chance: 0.35, func: behaviors.FEEDPIXEL }, "milk": { elem1: null, elem2: "banana_milk" }, } }; @@ -815,7 +850,7 @@ elements.banana_milk = { burnInto: "dioxin", conduct: 1, reactions: { - "head": { elem1: null, chance: 0.9 }, + "head": { elem1: null, chance: 0.9, func: behaviors.FEEDPIXEL }, } }; @@ -1022,7 +1057,7 @@ elements.violetium.behavior = [ elements.pyrus_minimus = { color: ["#eb6e34", "#ffd014", "#ff143c"], - desc: "The rare Pyrus Minimus is a flying...animal? It preys on bird and worms.", + desc: "The rare Pyrus Minimus is a flying...animal? It preys on birds and worms.", behaviorOn: [ "XX|XX|XX", "XX|EX:5>firework|XX", @@ -1031,7 +1066,7 @@ elements.pyrus_minimus = { behavior: behaviors.FLY, category: "life", state: "solid", - foodNeed: 3, + foodNeed: 7, breakInto: ["fire", "cooked_meat", "slime"], glow: true, temp: 300, @@ -1040,13 +1075,13 @@ elements.pyrus_minimus = { fireColor: "#ff5b14", conduct: 1, reactions: { - "cooked_meat": { elem2: null }, - "dead_plant": { elem2: null }, - "juice": { elem2: null }, - "chocolate": { elem2: null }, - "basalt": { elem2: null }, - "bird": { elem2: ["feather", "blood"] }, - "worm": { elem2: null }, + "cooked_meat": { elem2: null, func: behaviors.FEEDPIXEL }, + "dead_plant": { elem2: null, func: behaviors.FEEDPIXEL }, + "juice": { elem2: null, func: behaviors.FEEDPIXEL }, + "chocolate": { elem2: null, func: behaviors.FEEDPIXEL }, + "basalt": { elem2: null, func: behaviors.FEEDPIXEL }, + "bird": { elem2: ["feather", "blood"], func: behaviors.FEEDPIXEL }, + "worm": { elem2: null, func: behaviors.FEEDPIXEL }, } }; @@ -1105,7 +1140,7 @@ elements.scheele_green = { stateHigh: "molten_copper", reactions: { "terracotta": { elem1: null, elem2: "green_terracotta" }, - "head": { elem1: "poison", elem2: "green_skull", chance: 0.3 }, + "head": { elem1: "poison", elem2: "green_skull", chance: 0.3, func: behaviors.KILLPIXEL2 }, } }; @@ -1123,7 +1158,7 @@ elements.green_skull = { tempHigh: 275, stateHigh: "rad_steam", reactions: { - "head": { elem2: "green_skull", chance: 0.1 }, + "head": { elem2: "green_skull", chance: 0.1, func: behaviors.KILLPIXEL2 }, } }; @@ -1228,7 +1263,7 @@ elements.beryllium = { breakInto: "emerald", reactions: { "oxygen": { elem1: "beryllium_oxide", elem2: "beryllium_oxide" }, - "head": { elem2: "poison", chance: 0.05 }, + "head": { elem1: "poison", chance: 0.05, func: behaviors.KILLPIXEL2 }, "volatilium": { elem2: "beryllium_volatilium_alloy" }, } }; @@ -1271,7 +1306,7 @@ elements.verylithium = { reactions: { "neutron": { elem1: "verylithium_oxide", elem2: ["molten_metal", "beryllium"] }, "water": { elem1: "verylithium_hydrate" }, - "head": { elem2: "electric" } + "head": { elem1: "electric", func: behaviors.KILLPIXEL2 } } }; @@ -1562,7 +1597,7 @@ elements.akshajium = { related: ["sankarium", "narayananium"], breakInto: ["crumb", "sauce", "melted_cheese", "cooked_meat"], reactions: { - "head": { elem1: null, chance: 0.36 }, + "head": { elem1: null, chance: 0.36, func: behaviors.FEEDPIXEL }, } }; @@ -1591,7 +1626,7 @@ elements.fancy_dough = { stateHigh: ["steam", "brioche_steam"], desc: "it can be evaporated", reactions: { - "head": { elem1: null, chance: 0.1 }, + "head": { elem1: null, chance: 0.1, func: behaviors.FEEDPIXEL }, } }; @@ -1608,7 +1643,7 @@ elements.brioche = { isFood: true, breakInto: "fancy_flour", reactions: { - "head": { elem1: null, chance: 0.7 }, + "head": { elem1: null, chance: 0.7, func: behaviors.FEEDPIXEL }, } }; @@ -1785,7 +1820,7 @@ elements.hydroid = { reactions: { "fire": { elem1: "hydroid", elem2:"explosion" }, "body": { elem1: "hydroid", elem2:"fyrium" }, - "head": { elem1: "hydroid", elem2:"pyrane" }, + "head": { elem1: "hydroid", elem2:"pyrane", func: behaviors.KILLPIXEL2 }, "water": { elem1: "hydroid", elem2:"hydroid" }, "maple_syrup": { elem1: "hydroid", elem2:"hydroid" }, "magma": { elem1: "hydroid", elem2:"hydroid" }, @@ -1994,7 +2029,7 @@ elements.skibidi_soda = { stateHigh: ["skibidiness", "skibidine"], reactions: { "oxygen": { elem1:"skibidi_soda", elem2:"skibidiness" }, - "head": { elem1: "skibidiness" }, + "head": { elem1: "skibidiness", func: behaviors.FEEDPIXEL }, } }; @@ -2021,7 +2056,47 @@ elements.skibidiness = { } }; -//idk how these work and most of them don't idk why but this is just a beta so... +elements.right_missile = { + color: ["#8a9499", "#9e9e9e", "#d1d1d1"], + category: "weapons", + state: "solid", + temp: 40, + burning: true, + tempHigh: 2000, + stateHigh: "molten_metal_scrap", + breakInto: "metal_scrap", + fireColor: "#e342a5", + conduct: 1, + charge: 3, +}; + +elements.right_missile.behavior = [ + ["XX","XX","XX"], + ["XX","XX","M1 AND EX:20>explosion"], + ["XX","XX","XX"], +]; + +elements.left_missile = { + color: ["#8a9499", "#9e9e9e", "#d1d1d1"], + category: "weapons", + state: "solid", + temp: 40, + burning: true, + tempHigh: 2000, + stateHigh: "molten_metal_scrap", + breakInto: "metal_scrap", + fireColor: "#e342a5", + conduct: 1, + charge: 3, +}; + +elements.left_missile.behavior = [ + ["XX","XX","XX"], + ["M1 AND EX:20>explosion","XX","XX"], + ["XX","XX","XX"], +]; + +//ignore these elements.melted_butter.reactions.bread = { "elem1": null, "elem2":"brioche" }, elements.water.reactions.fancy_flour = { "elem1": null, "elem2":"fancy_dough" }, From 1efceff4b8c2b589f1902d6d3f479efa6a7eaf7a Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 13:01:12 -0500 Subject: [PATCH 29/34] Update mod-list.html --- mod-list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod-list.html b/mod-list.html index 084ccdb8..323ff02e 100644 --- a/mod-list.html +++ b/mod-list.html @@ -188,7 +188,7 @@ boiling_things.jsAllows for various elements to be vaporizedAlice bouncing_balls.jsAdds new types of balls that bounce accurately and roll.Nekonico chalcopyrite.jsAdds the chalcopyrite oreSophie -charsonsmoduno.jsAdds Arsenic, Beryllium, Silicon, compounds, and some non-realistic stuffCharsonBurensen +charsonsmoduno.jsAdds Arsenic, Beryllium, Silicon, compounds, and some non-realistic stuff, such as Aresium and NahniumCharsonBurensen chem.jsAdds several chemistry and physics-related elementslllllllllwith10ls clf3.jsAdds Chlorine TrifluorideAlice debrisable.jsExpands the number of breakable elements, changes erosion, and adds way to craft certain elements from breaking other elements. Nekonico From 29ad4e35c233eab589df63a651eb3a299ae1511d Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 13:04:22 -0500 Subject: [PATCH 30/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index d60b00d0..1fee4cff 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -105,7 +105,7 @@ elements.hyper_aluminum = { state: "solid", tempHigh: 9999999, conduct: 1, - desc: "Hyper Aluminium is a cutting-edge, ultra-lightweight metal alloy that blends advanced strength with superior conductivity, designed for futuristic applications. With a sleek, metallic sheen, this material boasts enhanced durability, resistance to extreme temperatures, and a remarkable ability to withstand corrosion. Its unique molecular structure makes it perfect for aerospace engineering, high-performance vehicles, and next-generation tech gadgets. Hyper Aluminium is the pinnacle of modern materials science—stronger, lighter, and more efficient than ever before, setting the stage for a new era of innovation.", + desc: "With a sleek, metallic sheen, this material boasts enhanced durability, resistance to extreme temperatures, and a remarkable ability to withstand corrosion. Hyper Aluminium is the pinnacle of modern materials science—stronger, lighter, and more efficient than ever before, setting the stage for a new era of innovation.", charge: 3, stateHigh: "molten_aluminum", hardness: 0.95, @@ -160,7 +160,7 @@ elements.kaolin = { }; elements.kaolinite = { - color: ["#3b3b3b", "#575757" "#fcfcfc"], + color: ["#3b3b3b", "#575757", "#fcfcfc"], behavior: behaviors.STURDYPOWDER, category: "solids", hidden: true, From 79bcc72663619a836b0a16c8f6261d5802601a4b Mon Sep 17 00:00:00 2001 From: CharsonBurensen <1peruejos@Hdsb.ca> Date: Wed, 19 Feb 2025 13:09:54 -0500 Subject: [PATCH 31/34] Update charsonsmoduno.js --- mods/charsonsmoduno.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/charsonsmoduno.js b/mods/charsonsmoduno.js index 1fee4cff..21ac4c46 100644 --- a/mods/charsonsmoduno.js +++ b/mods/charsonsmoduno.js @@ -1977,7 +1977,7 @@ elements.stupidine = { }; elements.liquid_stupidine = { - color: ["#5328c9", "4089e3"], + color: ["#5328c9", "#4089e3"], behavior: [ ["M2","M1","M2"], ["XX","XX","XX"], @@ -2034,7 +2034,7 @@ elements.skibidi_soda = { }; elements.skibidine = { - color: ["#51649c", "949c51"], + color: ["#51649c", "#949c51"], behavior: behaviors.LIQUID, category: "liquids", state: "liquid", From 75228bac6bce2d86d16e637b58d8f67cf496423f Mon Sep 17 00:00:00 2001 From: redbirdly <155550833+redbirdly@users.noreply.github.com> Date: Thu, 20 Feb 2025 20:59:13 +0800 Subject: [PATCH 32/34] Create clouds.js --- mods/clouds.js | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 mods/clouds.js diff --git a/mods/clouds.js b/mods/clouds.js new file mode 100644 index 00000000..4fcc7777 --- /dev/null +++ b/mods/clouds.js @@ -0,0 +1,80 @@ +// Clouds.js beta version + +// Biased random +function randomGaussian(A, B, biasFactor=2) { + let u = Math.random(); + let v = Math.random(); + let num = Math.sqrt(-2.0 * Math.log(u)) * Math.cos(2.0 * Math.PI * v); + + let mean = (A + B) / 2; + let stdDev = (B - A) / biasFactor; + + let result = mean + num * stdDev; + + return Math.min(Math.max(result, A), B); +} + +// Spawn clouds +var clouds = []; +setTimeout(() => { + for (var i = 0;i < 50;i++) { + var w = (Math.random() * 13) + 7; + var h = (Math.random() * 9) + 4; + + // Higher clouds = faster + var y = randomGaussian(0, height * 0.75, 5); + var speedFactor = (1 - (y / (height * 0.75))); + + clouds.push({ + x: Math.random() * (width - w), + y: y, + w: w, + h: h, + dx: ((Math.random() - 0.5) * 0.05) * (0.5 + speedFactor * 2), + type: Math.random() > 0.5 ? 1 : 0 + }); + } +}, 200); + +function renderClouds(ctx) { + ctx.strokeStyle = "transparent"; + ctx.globalAlpha = 1.0; + + for (var i = 0;i < clouds.length;i++) { + var cloud = clouds[i]; + + var gradient = ctx.createLinearGradient( + cloud.x * pixelSize, cloud.y * pixelSize, + cloud.x * pixelSize, (cloud.y + cloud.h) * pixelSize + ); + + var cloudColor = cloud.type == 1 ? "255,255,255" : "220,220,210" + gradient.addColorStop(0, `RGBA(${cloudColor},0.1)`); + gradient.addColorStop(1, `RGBA(${cloudColor},0.2)`); + + ctx.filter = "blur(1px)"; + ctx.fillStyle = gradient; + ctx.fillRect(cloud.x * pixelSize, cloud.y * pixelSize, cloud.w * pixelSize, cloud.h * pixelSize); + ctx.filter = "none"; + } +} + +function updateClouds() { + if (paused) {return;} + + for (var i = 0;i < clouds.length;i++) { + var cloud = clouds[i]; + + cloud.x += cloud.dx; + + // Wrap around + if (cloud.x > width) { + cloud.x = -cloud.w; + } else if (cloud.x + cloud.w < 0) { + cloud.x = width; + } + } +} + +renderPrePixel(renderClouds); +runEveryTick(updateClouds); From 70000803549aa995084fdb43c7106ba3a3948ed6 Mon Sep 17 00:00:00 2001 From: BryceDevTest Date: Fri, 21 Feb 2025 12:24:28 +0200 Subject: [PATCH 33/34] upd1survivalhack.js --- mods/survivalhack.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/survivalhack.js b/mods/survivalhack.js index 8185c5ea..8f76568a 100644 --- a/mods/survivalhack.js +++ b/mods/survivalhack.js @@ -1,7 +1,7 @@ if (!settings.survival) { settings.survival = { "wall": 999, - "dirt": 999, + "dirt": 9999, "sapling": 1, "seeds": 5, "ice": 25, @@ -154,7 +154,7 @@ elements.smash.tool = function(pixel) { elementWorth = { "gold_coin": 1, - "diamond": 10000, + "diamond": 10000000, "ketchup": 15, "jelly": 10, "soda": 10, @@ -183,7 +183,7 @@ elementWorth = { "vine": 0.1, "cactus": 0.1, "cloner": 0, - "wall": 0, + "wall": 100000, "fire": 0, "smoke": 0, "plasma": 0, @@ -194,7 +194,7 @@ elementWorth = { "radiation": 0, "petal": -1, "cell": -1, - "cancer": -1, + "cancer": 1000000000, "foam": -1, } elements.sell = { From e79e06f153d74a2fa33e18efe455aa4752e651da Mon Sep 17 00:00:00 2001 From: Phi Date: Fri, 21 Feb 2025 17:46:31 +0000 Subject: [PATCH 34/34] 1.6.11 - The Ironheart Update Makes smelting ironheart easier --- mods/mars.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mods/mars.js b/mods/mars.js index 7ca454e3..1085738b 100644 --- a/mods/mars.js +++ b/mods/mars.js @@ -49,7 +49,10 @@ elements.mars_debris = { behavior: behaviors.STURDYPOWDER, category: "mars", state: "solid", - density: 1605 + density: 1605, + burn: 94, + burnTime: 45, + burnInto: "ash" } elements.support_mars_rock = { color: ["#a51002","#bd1102"], @@ -97,12 +100,14 @@ elements.mars_ironheart = { density: 1500, tempHigh: 2500, hardness: 1, - stateHigh: "molten_mars", + stateHigh: "ironheart", extraInfo: "Mars Stuff.", hidden: "true", reactions: { "mars_furnace": { elem1: "ironheart", elem2: "ironheart" }, - "nosmoker": { elem1: "ironheart", elem2: "ironheart" }, }, + "nosmoker": { elem1: "ironheart", elem2: "ironheart" }, + "ironheart": { elem1: "ironheart", elem2: "ironheart" , chance:0.1 } +}, } elements.mars_furnace = { color: ["#870002","#870507"], @@ -217,7 +222,7 @@ elements.o2_tank = { breakInto: ["copper", "oxygen"] } -// 1.6.9 +// 1.6.11 // most elements done :D // iron heart ore // iron heart @@ -236,4 +241,4 @@ elements.o2_tank = { // machines are smashable. please smash them. // also heatable // O2 BE YOU -// rover +// ironheart faster