From 8d8186bb0bff5a8c967ece058669db08515f6849 Mon Sep 17 00:00:00 2001 From: Nekonico <163950752+DBNekonico@users.noreply.github.com> Date: Wed, 9 Oct 2024 22:12:04 -0700 Subject: [PATCH] Pills! --- mods/genetics.js | 378 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 303 insertions(+), 75 deletions(-) diff --git a/mods/genetics.js b/mods/genetics.js index 2309d2ab..be89639c 100644 --- a/mods/genetics.js +++ b/mods/genetics.js @@ -1,6 +1,11 @@ /* by nekonico, do not steal!!!!!! >:3*/ elements.organism = { + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "M2%10|M1|M2%10", + ], color: ["#997457","#a89a76"], properties: { geneticCode: 0, @@ -172,15 +177,6 @@ elements.organism = { pixel.dead = true; } if (pixel.geneticCode < 11) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.9 && isEmpty(pixel.x-1, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y+1); - } - else if (Math.random() > 0.9 && isEmpty(pixel.x+1, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y+1); - } if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "sugar") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -317,16 +313,13 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 20 && pixel.geneticCode < 31) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.95 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.95 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.95 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "sugar") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -376,7 +369,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -394,7 +387,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -497,16 +490,13 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 30 && pixel.geneticCode < 41) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.9 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.9 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.9 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "sugar") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -556,7 +546,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { /* by nekonico, do not steal!!!!!! >:3*/ if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -574,7 +564,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -685,16 +675,13 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 40 && pixel.geneticCode < 51) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.9 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.9 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.9 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "sugar") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -776,7 +763,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -810,7 +797,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -937,16 +924,13 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 50 && pixel.geneticCode < 61) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.8 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.8 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.8 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "sugar") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -1028,7 +1012,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -1094,7 +1078,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -1285,16 +1269,13 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 60 && pixel.geneticCode < 71) { - if (isEmpty(pixel.x, pixel.y+1)) { - /* by nekonico, do not steal!!!!!! >:3*/ movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.8 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.8 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.8 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "sugar") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -1376,7 +1357,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -1474,7 +1455,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -1697,16 +1678,13 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 70 && pixel.geneticCode < 81) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.75 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.75 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.75 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && elements[pixelMap[pixel.x][pixel.y-1].element].isFood) { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -1756,7 +1734,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -1886,7 +1864,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -2141,16 +2119,13 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 80 && pixel.geneticCode < 91) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.75 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.75 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.75 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && elements[pixelMap[pixel.x][pixel.y-1].element].isFood) { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -2200,7 +2175,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -2362,7 +2337,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -2649,16 +2624,13 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 90 && pixel.geneticCode < 101) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.75 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.75 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.75 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && elements[pixelMap[pixel.x][pixel.y-1].element].isFood) { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -2708,7 +2680,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -2902,7 +2874,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -3221,19 +3193,16 @@ elements.organism = { pixel.age += 1 } else if (pixel.geneticCode > 100) { - if (isEmpty(pixel.x, pixel.y+1)) { - movePixel(pixelMap[pixel.x][pixel.y], pixel.x, pixel.y+1); - } - else if (Math.random() > 0.75 && isEmpty(pixel.x-1, pixel.y)) { + if (Math.random() > 0.75 && isEmpty(pixel.x-1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x-1, pixel.y); } else if (Math.random() > 0.75 && isEmpty(pixel.x+1, pixel.y)) { movePixel(pixelMap[pixel.x][pixel.y], pixel.x+1, pixel.y); } - if (pixel.vore === 0) { + if (pixel.vore > -3 && pixel.vore < 3) { changePixel(pixel,"human"); } - else if (pixel.vore > 0) { + else if (pixel.vore > 2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "meat") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -3427,7 +3396,7 @@ elements.organism = { pixel.food += 1 } } - else if (pixel.vore < 0) { + else if (pixel.vore < -2) { if (Math.random() < 0.1 && !isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "grass") { deletePixel(pixel.x, pixel.y-1); pixel.food += 1 @@ -3748,8 +3717,18 @@ elements.organism = { pixel.oldvore = pixel.vore }, reactions: { - "cancer": { "elem1":"cancer", "chance":0.005 }, - "radiation": { "elem1":["ash","grass","meat","cooked_meat","dead_plant","dna","sugar"], "chance":0.4 }, + "cancer": { elem1:"cancer", chance:0.005 }, + "radiation": { elem1:["ash","grass","meat","cooked_meat","dead_plant","dna","sugar"], chance:0.4, func:function(pixel) { + if (pixel1.vore > 2) { + changePixel(pixel,"cooked_meat"); + } + else if (pixel1.vore < -2) { + changePixel(pixel,"dead_plant"); + } + else if (pixel1.vore > -3 && pixel1.vore < 3) { + changePixel(pixel,"ash"); + } + }}, }, burn: 10, burnTime: 250, @@ -3762,6 +3741,255 @@ elements.organism = { category: "organism", state: "solid", density: 1050 - } +} + +elements.food_pill = { + behavior: behaviors.POWDER, + reactions: { + "organism": { elem1: null, chance:0.1, func:function(pixel1,pixel2) { + if (pixel2.vore > 2) { + pixel2.food += 2 + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.vore < -2) { + pixel2.food += 2 + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.vore > -3 && pixel2.vore < 3) { + pixel2.food += 5 + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + }}, + }, + category: "organism", + state: "solid", + color: ["#2b1107","#5c3322","#2b1107","#5c3322","#2b1107","#5c3322"], + tempHigh: 250, + stateHigh: ["sugar","cooked_meat","smoke","smoke","smoke","dead_plant","smoke","smoke","smoke","stench"], + burn: 10, + burnTime: 200, + burnInto: ["sugar","cooked_meat","smoke","smoke","smoke","dead_plant","smoke","smoke","smoke","stench"], + breakInto: ["sugar","cooked_meat","dead_plant","dust","dust","dust","dust","dust","dust","dust","dust","dust","dust","dust","dust","dust"], + breakIntoColor: ["#2b1107","#5c3322","#5c3322","#5c3322","#5c3322","#5c3322","#5c3322","#5c3322","#41770B","#774C35"], + isFood: true +} + +elements.pacifism_pill = { + behavior: behaviors.POWDER, + reactions: { + "organism": { elem1: null, chance:0.1, func:function(pixel1,pixel2) { + if (pixel2.vore > 0) { + pixel2.vore -= 1 + if (Math.random() > 0.9) { + pixel2.food += 1 + }; + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.vore < 0) { + pixel2.vore -= 1 + pixel2.food += 1 + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.vore === 0) { + pixel2.vore -= 1 + if (Math.random() > 0.9) { + pixel2.food += 1 + }; + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + }}, + }, + category: "organism", + state: "solid", + color: ["#58AA38","#58AA38","#3D6D4B","#316232","#6CA65A","#58AA38","#3D6D4B","#316232","#58AA38","#58AA38","#3D6D4B","#316232"], + tempHigh: 250, + stateHigh: ["molten_plastic","dead_plant","smoke","smoke","smoke","dead_plant","smoke","smoke","smoke","stench","stench"], + burn: 10, + burnTime: 200, + burnInto: ["molten_plastic","dead_plant","smoke","smoke","smoke","dead_plant","smoke","smoke","smoke","stench","stench"], + breakInto: ["dead_plant","dust","dust","dust","dust","dust","dust"], + breakIntoColor: ["#6CA65A","#58AA38","#6CA65A","#6CA65A"], + isFood: true +} + +elements.neutrality_pill = { + behavior: behaviors.POWDER, + reactions: { + "organism": { elem1: null, chance:0.1, func:function(pixel1,pixel2) { + if (pixel2.vore > 0) { + pixel2.vore -= 1 + if (Math.random() > 0.9) { + pixel2.food += 1 + }; + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.vore < 0) { + pixel2.vore += 1 + if (Math.random() > 0.9) { + pixel2.food += 1 + }; + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.vore === 0) { + pixel2.food += 1 + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + }}, + }, + category: "organism", + state: "solid", + color: ["#c5dede","#c5dede","#464196","#2E2B64","#a4b3b3","#c5dede","#464196","#2E2B64","#c5dede","#c5dede","#464196","#2E2B64"], + tempHigh: 250, + stateHigh: ["molten_plastic","sugar","smoke","smoke","smoke","sugar","smoke","smoke","smoke","stench","stench"], + burn: 10, + burnTime: 200, + burnInto: ["molten_plastic","sugar","smoke","smoke","smoke","sugar","smoke","smoke","smoke","stench","stench"], + breakInto: ["sugar","dust","dust","dust","dust","dust","dust"], + breakIntoColor: ["#a4b3b3","#c5dede","#a4b3b3","#a4b3b3"], + isFood: true +} + +elements.aggression_pill = { + behavior: behaviors.POWDER, + reactions: { + "organism": { elem1: null, chance:0.1, func:function(pixel1,pixel2) { + if (pixel2.vore > 0) { + pixel2.vore += 1 + pixel2.food += 1 + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.vore < 0) { + pixel2.vore += 1 + if (Math.random() > 0.9) { + pixel2.food += 1 + }; + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.vore === 0) { + pixel2.vore += 1 + if (Math.random() > 0.9) { + pixel2.food += 1 + }; + if (Math.random() > 0.9) { + pixel2.geneticCode += 1 + }; + } + }}, + }, + category: "organism", + state: "solid", + color: ["#B13E3E","#B13E3E","#8E122A","#870C1C","#A83232","#B13E3E","#8E122A","#870C1C","#B13E3E","#B13E3E","#8E122A","#870C1C"], + tempHigh: 250, + stateHigh: ["molten_plastic","cooked_meat","smoke","smoke","smoke","cooked_meat","smoke","smoke","smoke","stench","stench"], + burn: 10, + burnTime: 200, + burnInto: ["molten_plastic","cooked_meat","smoke","smoke","smoke","cooked_meat","smoke","smoke","smoke","stench","stench"], + breakInto: ["cooked_meat","dust","dust","dust","dust","dust","dust"], + breakIntoColor: ["#A83232","#B13E3E","#A83232","#A83232"], + isFood: true +} + +elements.growth_pill = { + behavior: behaviors.POWDER, + reactions: { + "organism": { elem1: null, chance:0.1, func:function(pixel1,pixel2) { + if (pixel2.vore > 0) { + if (Math.random() > 0.9) { + pixel2.food += 1 + }; + if (Math.random() > 0.99) { + pixel2.vore += 1 + }; + pixel2.geneticCode += 1 + } + else if (pixel2.vore < 0) { + if (Math.random() > 0.8) { + pixel2.food += 1 + }; + if (Math.random() > 0.99) { + pixel2.vore -= 1 + }; + pixel2.geneticCode += 1 + } + else if (pixel2.vore === 0) { + if (Math.random() > 0.75) { + pixel2.food += 1 + }; + pixel2.geneticCode += 1 + } + }}, + }, + category: "organism", + state: "solid", + color: ["#ECF4B0","#ECF4B0","#D1D099","#CBCA8C","#D2D9A6","#ECF4B0","#D1D099","#CBCA8C","#ECF4B0","#ECF4B0","#D1D099","#CBCA8C"], + tempHigh: 250, + stateHigh: ["molten_plastic","sugar","smoke","smoke","smoke","herb","smoke","smoke","smoke","stench"], + burn: 10, + burnTime: 200, + burnInto: ["molten_plastic","sugar","smoke","smoke","smoke","herb","smoke","smoke","smoke","stench"], + breakInto: ["sugar","dust","dust","dust","dust","dust","dust","herb","dust","dust","dust","dust","dust","dust"], + breakIntoColor: ["#D2D9A6","#ECF4B0","#D2D9A6","#D2D9A6"], + isFood: true +} + +elements.antiaging_pill = { + name: "anti-aging_pill", + behavior: behaviors.POWDER, + reactions: { + "organism": { elem1: null, chance:0.1, func:function(pixel1,pixel2) { + if (pixel2.age > 99) { + pixel2.age -= 100; + if (Math.random() > 0.999) { + pixel2.food += 1 + }; + if (Math.random() > 0.995) { + pixel2.geneticCode += 1 + }; + } + else if (pixel2.age < 100) { + pixel2.age = 100; + if (Math.random() > 0.999) { + pixel2.food += 1 + }; + if (Math.random() > 0.995) { + pixel2.geneticCode += 1 + }; + } + }}, + }, + category: "organism", + state: "solid", + color: ["#B8C5C5","#B8C5C5","#9291A6","#8C8B99","#A8AFAF","#B8C5C5","#9291A6","#8C8B99","#B8C5C5","#B8C5C5","#9291A6","#8C8B99"], + tempHigh: 250, + stateHigh: ["molten_plastic","magnesium","smoke","smoke","smoke","sugar","smoke","smoke","smoke","stench","stench","stench"], + burn: 10, + burnTime: 200, + burnInto: ["molten_plastic","magnesium","smoke","smoke","smoke","sugar","smoke","smoke","smoke","stench","stench","stench"], + breakInto: ["magnesium","dust","dust","dust","dust","dust","dust","sugar","dust","dust","dust","dust","dust","dust"], + breakIntoColor: ["#A8AFAF","#B8C5C5","#A8AFAF","#A8AFAF"], + isFood: true +} /* by nekonico, do not steal!!!!!! >:3*/