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"]