diff --git a/mod-list.html b/mod-list.html
index 04f4401e..6985365b 100644
--- a/mod-list.html
+++ b/mod-list.html
@@ -180,7 +180,9 @@
| bettermetalscrap.js | Allows metal scrap to be melted back into its original material | nousernamefound |
| bigger_star_spawners.js | Adds spawners for larger stars | Alice |
| bioooze_and_pyrogens.js | Adds Bio-Ooze from Frackin’ Universe and several heat-producing materials from various games’ mods | Alice |
+| biology.js | Adds various elements and functions that let you build your own organism. | Nekonico |
| boiling_things.js | Allows for various elements to be vaporized | Alice |
+| bouncing_balls.js | Adds new types of balls that bounce accurately and roll. | Nekonico |
| chalcopyrite.js | Adds the chalcopyrite ore | Sophie |
| chem.js | Adds several chemistry and physics-related elements | lllllllllwith10ls |
| clf3.js | Adds Chlorine Trifluoride | Alice |
@@ -274,6 +276,7 @@
| apioforms_pre.js | An incomplete implementation of elements from the Apioform Game | Alice |
| bacteria_mod.js | Adds content from the Bacterium Mod: (Bacteria, Replacer B., Jammer Block) | Alice |
| bananas.js | Adds bananas and banana plants | Alice |
+| biology.js | Adds various elements and functions that let you build your own organism. | Nekonico |
| cat.js | Adds cats and cat food | SquareScreamYT |
| cells.js | Adds several experimental edits of the Cell element | Alice |
| colonies.js | Adds rockets that contain settlers to terraform a planet. | Nekonico |
@@ -283,6 +286,7 @@
| fantastic_creatures.js | Adds various animals | Melecie |
| fantasy_elements.js | Fantasy creatures and substances | pixelegend4 |
| fey_and_more.js | Adds fairies, magic, and a lot of other things | Melecie |
+| fishin.js | Adds a fishing rod and more fish with scientific names, press B to open bank account, A, S or D to cast your line and Q to reel it back in. | Nekonico |
| flowers_and_forests.js | adds trees and flowers and things to do with nature | pixelegend4 and SquareScreamYT |
| fwibblen.js | Adds a flying creature that turns nickel into itself, and a second creature that does the same to the first one | Alice |
| genetics.js | Adds an organism that evolves and changes as it creates more of itself by eating, and adapts to environment. | Nekonico |
@@ -316,6 +320,7 @@
| collab_mod.js | Created by multiple people, adds random things | mrapple, ilikepizza, stefanblox |
| doom.js | As seen on TikTok - Select the Doom element to start, WASD | ggod |
| elem3.js | Adds all elements and combinations from Elemental 3 [Very Large] | Sophie |
+| fishin.js | Adds a fishing rod and more fish with scientific names, press B to open bank account, A, S or D to cast your line and Q to reel it back in. | Nekonico |
| fools+.js | improves and makes fools.js EXTREMELY annoying. | SquareScreamYT |
| funny elements 2022-11-15.js | Adds a few curated randomly-generated elements | Alice |
| funnynames.js | Adds various ways to mess with the names of elements | nousernamefound |
diff --git a/mods/ExtraMachines.js b/mods/ExtraMachines.js
index 25520dd7..4fae795e 100644
--- a/mods/ExtraMachines.js
+++ b/mods/ExtraMachines.js
@@ -303,7 +303,7 @@ elements.e_SuperHeater = {
desc: "Works like the Super Heater but needs power to work",
hardness: 0.5,
state: "solid",
- behavior: behaviors.WALL,
+ color: "#595656",
conduct: 1,
category: "machines",
color: "#881111",
@@ -775,7 +775,7 @@ elements.Destructive_Filter = {
color: "#3c6c85",
desc: "A filter that destroys anything that isn't allowed to get through",
onSelect: function() {
- var answer4 = prompt("Please input the desired element of this filter. It is case senstive.",(filterTypeVar||undefined));
+ var answer4 = prompt("Please input the desired element of this filter.The the desired element will not get destroyed but everything else will.",(filterTypeVar||undefined));
if (!answer4) { return }
filterTypeVar2 = answer4;
},
@@ -860,7 +860,10 @@ elements.Destructive_Filter = {
pixel.con.del;
moved = true;
break;
- }
+ } else if (!(newPixel.element == pixel.filterType) && !(newPixel.element == pixel.element)) {
+ deletePixel(newPixel.x,newPixel.y);
+ }
+
}
}
@@ -1201,6 +1204,7 @@ elements.E_Spout = {
conduct: 1,
}
+
elements.DestroyableWire = {
color: "#4d0a03",
behavior: behaviors.WALL,
@@ -1899,27 +1903,23 @@ elements.Missile_Up = {
"uranium_particles": { elem1:null, elem2:"supernova", chance:0.000001}
},
category: "???????",
- }
+
+ }
+ ignoreGate = ["wall", "wire", "battery"];
elements.air_filter = {
color: "#414c4f",
tick: function(pixel) {
-
+ pixel.stage = 2
if (!pixel.stage && pixelTicks-pixel.start > 60) {
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
- // delete this bc it makes the pipe walls
- // if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
- // deletePixel(x,y)
- // }
- // if (isEmpty(x,y)) {
- // createPixel("pipe_wall",x,y);
- // }
+
}
pixel.stage = 2;
}
@@ -1929,12 +1929,7 @@ elements.Missile_Up = {
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
pixel.stage = 2;
- // this makes the thing blue and keep pixel.stage = 2 cuz without it it breaks the code
- // if (isEmpty(x,y)) {
- // pixel.stage = 2; //blue
- // pixel.color = pixelColorPick(pixel,"#000036");
- // break;
- // }
+
}
}
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
@@ -1947,9 +1942,7 @@ elements.Missile_Up = {
if (newPixel.stage === 1) {
var newColor;
switch (pixel.stage) {
- case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
- case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
- case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
+
}
newPixel.color = pixelColorPick(newPixel,newColor);
}
@@ -2023,3 +2016,323 @@ elements.Missile_Up = {
canContain: true,
}
+
+ function checkPixels(pixel, upOrDown) {
+ var change = null;
+
+ var x = pixel.x;
+ var y = pixel.y;
+
+ for (let i = 0; i < 7; i++) {
+ if (upOrDown == true) {
+ if (!isEmpty(x, y - i)) {
+ var sensed = pixelMap[x][pixel.y - i];
+ if (!(sensed.element == pixel.element)) {
+ // if (sensed.element.category === "solids") {
+ tryMove(sensed, sensed.x, sensed.y - 1);
+ // }
+ }
+ }
+ } else if (upOrDown == false) {
+ if (!isEmpty(x, y + i)) {
+ var sensed = pixelMap[x][pixel.y + i];
+ if (!(sensed.element == pixel.element)) {
+ // if (sensed.element.category === "solids") {
+ tryMove(sensed, sensed.x, sensed.y + 1);
+ // }
+ }
+ }
+ }
+ }
+ }
+ function checkPixels2(pixel, BringupOrDown) {
+ var change = null;
+
+ var x = pixel.x;
+ var y = pixel.y;
+
+ for (let i = 0; i < 7; i++) {
+ if (BringupOrDown == true) {
+ if (!isEmpty(x, y - i)) {
+ var sensed = pixelMap[x][pixel.y - i];
+ if (!(sensed.element == pixel.element)) {
+ // if (sensed.element.category === "solids") {
+ tryMove(sensed, sensed.x, sensed.y + 1);
+ // }
+ }
+ }
+ } else if (BringupOrDown == false) {
+ if (!isEmpty(x, y + i)) {
+ var sensed = pixelMap[x][pixel.y + i];
+ if (!(sensed.element == pixel.element)) {
+ // if (sensed.element.category === "solids") {
+ tryMove(sensed, sensed.x, sensed.y - 1);
+ // }
+ }
+ }
+ }
+ }
+ }
+
+
+
+ elements.Repel_Up_Magnet = {
+ color: "#595656",
+ behavior: behaviors.WALL,
+ singleColor: true,
+ category: "machines",
+ state: "solid",
+
+ tick: function(pixel){
+ checkPixels(pixel,true)
+ }
+ }
+
+ elements.Repel_Down_Magnet = {
+ color: "#595656",
+ singleColor: true,
+ category: "machines",
+ state: "solid",
+ behavior: behaviors.WALL,
+
+ tick: function(pixel){
+ checkPixels(pixel,false)
+ }
+ }
+
+ elements.Magnet_Pull_Down = {
+ color: "#595656",
+ singleColor: true,
+ category: "machines",
+ state: "solid",
+ behavior: behaviors.WALL,
+
+ tick: function(pixel){
+ checkPixels2(pixel,true)
+ }
+ }
+
+ elements.Magnet_Pull_Up = {
+ color: "#595656",
+ singleColor: true,
+ category: "machines",
+ state: "solid",
+ behavior: behaviors.WALL,
+
+ tick: function(pixel){
+ checkPixels2(pixel,false)
+ }
+ }
+
+ elements.Nucler_Fusion = {
+ color: "#595656",
+ maxSize: 1,
+ behavior: behaviors.WALL,
+ tick: function(pixel) {
+ if(pixel.start) {
+ explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
+ }
+ }
+ }
+
+
+
+
+
+ SelectedX = null;
+ SelectedY = null;
+ elements.WireLessPower = {
+ color: "#595656",
+ singleColor: true,
+ category: "machines",
+ state: "solid",
+ behavior: behaviors.WALL,
+ conduct : 1,
+ onSelect: function() {
+ var answer4 = prompt("X pos",(SelectedX||undefined));
+ if (!answer4) { return }
+ SelectedX = answer4;
+ var answer5 = prompt("Y pos",(SelectedY||undefined));
+ if (!answer5) { return }
+ SelectedY = answer5;
+ },
+
+ tick: function(pixel){
+ if (pixel.start === pixelTicks) {
+ pixel.SelX = SelectedX;
+ pixel.SelY = SelectedY;
+ pixel.placed = false;
+
+ }
+ if(isEmpty(pixel.SelX,pixel.SelY) && pixel.placed == false){
+ createPixel("wire",pixel.SelX,pixel.SelY);
+ pixel.placed = true;
+ }
+ if(pixel.chargeCD) {
+ if (!isEmpty(pixel.SelX,pixel.SelY)) {
+ var sensed = pixelMap[pixel.SelX][pixel.SelY];
+ if(!sensed) {return}
+ if (!sensed.chargeCD && !sensed.charge) sensed.charge = 1;
+ }
+ }
+
+ }
+ }
+
+
+
+ // elements.E_Gate = {
+
+ // name: "E-Gate",
+ // color: "#414c4f",
+ // conduct : 1,
+ // tick: function(pixel) {
+ // pixel.stage = 2
+ // if (!pixel.stage && pixelTicks-pixel.start > 60) {
+ // for (var i = 0; i < squareCoords.length; i++) {
+ // var coord = squareCoords[i];
+ // var x = pixel.x+coord[0];
+ // var y = pixel.y+coord[1];
+
+ // }
+ // pixel.stage = 2;
+ // }
+ // else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
+ // for (var i = 0; i < adjacentCoords.length; i++) {
+ // var coord = adjacentCoords[i];
+ // var x = pixel.x+coord[0];
+ // var y = pixel.y+coord[1];
+ // pixel.stage = 2;
+
+ // }
+ // }
+ // else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
+ // for (var i = 0; i < squareCoords.length; i++) {
+ // var coord = squareCoords[i];
+ // var x = pixel.x+coord[0];
+ // var y = pixel.y+coord[1];
+ // if (!isEmpty(x,y,true) && pixelMap[x][y].element === "pipe") {
+ // var newPixel = pixelMap[x][y];
+ // if (newPixel.stage === 1) {
+ // var newColor;
+ // switch (pixel.stage) {
+
+ // }
+ // newPixel.color = pixelColorPick(newPixel,newColor);
+ // }
+ // }
+ // }
+ // var moved = false;
+ // shuffleArray(squareCoordsShuffle);
+ // for (var i = 0; i < squareCoordsShuffle.length; i++) {
+ // var coord = squareCoordsShuffle[i];
+ // var x = pixel.x+coord[0];
+ // var y = pixel.y+coord[1];
+ // if (!isEmpty(x,y,true)) {
+ // var newPixel = pixelMap[x][y];
+ // if (newPixel.element === "pipe") {
+ // var nextStage;
+ // switch (pixel.stage) {
+
+ // }
+ // if (pixel.con && !newPixel.con && newPixel.stage === nextStage) { //transfer to jacent pipe
+ // newPixel.con = pixel.con;
+ // newPixel.con.x = newPixel.x;
+ // newPixel.con.y = newPixel.y;
+ // pixel.con = null;
+ // moved = true;
+ // break;
+ // }
+ // }
+ // else if (!pixel.con && pixel.chargeCD & !(newPixel.element == pixel.element)&& !(ignoreGate.includes(newPixel.element))) { //suck up pixel
+ // pixel.con = newPixel;
+ // deletePixel(newPixel.x,newPixel.y);
+ // pixel.con.x = pixel.x;
+ // pixel.con.y = pixel.y;
+ // pixel.con.del;
+ // moved = true;
+ // break;
+ // }
+ // }
+ // }
+ // if (pixel.con && !moved) { // move to same stage if none other
+ // for (var i = 0; i < squareCoordsShuffle.length; i++) {
+ // var coord = squareCoordsShuffle[i];
+ // var x = pixel.x+coord[0];
+ // var y = pixel.y+coord[1];
+ // if (isEmpty(x,y)) {
+ // delete pixel.con.del;
+ // pixel.con.x = x;
+ // pixel.con.y = y;
+ // pixelMap[x][y] = pixel.con;
+ // currentPixels.push(pixel.con);
+ // pixel.con = null;
+ // break;
+ // }
+ // if (!isEmpty(x,y,true) && pixelMap[x][y].element === "pipe") {
+ // var newPixel = pixelMap[x][y];
+ // if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
+ // newPixel.con = pixel.con;
+ // newPixel.con.x = newPixel.x;
+ // newPixel.con.y = newPixel.y;
+ // pixel.con = null;
+ // break;
+ // }
+ // }
+ // }
+ // }
+ // }
+ // doDefaults(pixel);
+ // },
+ // category: "machines",
+ // movable: false,
+ // canContain: true,
+
+ // }
+
+ // RangeSelected = null;
+ // elements.fan = {
+ // color: "#595656",
+ // category: "machines",
+ // state: "solid",
+ // conduct : 1,
+ // behavior : behaviors.WALL,
+ // onSelect: function() {
+ // var answer4 = prompt("Enter a range for how far the fan blows.",(RangeSelected||undefined));
+ // if (!answer4) { return }
+ // RangeSelected = answer4;
+ // },
+ // tick: function(pixel){
+ // if (pixel.start === pixelTicks) {
+ // pixel.RangeBlow = RangeSelected
+ // }
+ // for (let i = 0; i < pixel.RangeBlow; i++) {
+ // if (!isEmpty(pixel.x+1, pixel.y)) {
+ // var sensed = pixelMap[pixel.x+1][pixel.y];
+ // if (!sensed) {return}
+ // if (!(sensed.element == pixel.element)) {
+ // if (elements[sensed.element].category == "gases" || elements[sensed.element].category == "powders") {
+
+ // tryMove(sensed, sensed.x+1, sensed.y );
+ // }
+ // }
+ // }
+ // }
+ // },
+
+ // }
+
+ // elements.test_Element = {
+ // color: "#595656",
+ // singleColor: true,
+ // category: "test",
+ // state: "solid",
+ // behavior : [
+ // ["XX","DL","XX"],
+ // ["DL","XX","DL"],
+ // ["M2","M1 AND DL","M2"]
+ // ],
+ // tick: function(pixel) {},
+ // conduct : 1,
+
+ // }
diff --git a/mods/biology.js b/mods/biology.js
new file mode 100644
index 00000000..669c6f25
--- /dev/null
+++ b/mods/biology.js
@@ -0,0 +1,2595 @@
+viewInfo[4] = { // Nutrition View
+ name: "nutr",
+ pixel: function(pixel,ctx) {
+ if (elements[pixel.element].isBio === true) {
+ var nutrition = pixel.nutrition;
+ if (nutrition < 0) {nutrition = 0}
+ if (nutrition > 6000) {nutrition = 6000}
+ // logarithmic scale, with coldest being 225 (-50 degrees) and hottest being 0 (6000 degrees)
+ var hue = Math.round(225 - (Math.log(nutrition)/Math.log(6000))*225);
+ if (hue < 0) {hue = 0}
+ if (hue > 225) {hue = 225}
+ drawSquare(ctx,"hsl("+hue+",100%,50%)",pixel.x,pixel.y)
+ }
+ }
+}
+
+viewInfo[5] = { // Oxy View
+ name: "oxy",
+ pixel: function(pixel,ctx) {
+ if (elements[pixel.element].isBio === true) {
+ var oxygen = pixel.oxygen;
+ if (oxygen < 0) {oxygen = 0}
+ if (oxygen > 6000) {oxygen = 6000}
+ var hue = Math.round(225 - (Math.log(oxygen)/Math.log(6000))*225);
+ if (hue < 0) {hue = 0}
+ if (hue > 225) {hue = 225}
+ drawSquare(ctx,"hsl("+hue+",100%,50%)",pixel.x,pixel.y)
+ }
+ }
+}
+
+elements.real_skin = {
+ color: "#f7ead0",
+ category: "biology",
+ behavior: behaviors.WALL,
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if ((pixel.temp > 35 || pixel.temp < 10) && Math.random() < 0.005) {
+ for (var i = 0; i < adjacentCoords.length; i++) {
+ var coords = adjacentCoords[i];
+ var x = pixel.x + coords[0];
+ var y = pixel.y + coords[1];
+ if (isEmpty(x,y)) {
+ if (pixel.temp > 35) {
+ pixel.temp -= 20;
+ createPixel("salt_water",x,y);
+ break;
+ }
+ pixel.temp += 20;
+ break;
+ }
+ }
+ }
+ if (pixel.temp < 15 && Math.random() < 0.1) {
+ pixel.temp += 1;
+ }
+ doDefaults(pixel);
+ if (Math.random() > 0.92 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ if (Math.random() < 0.75) {
+ changePixel(pixel,"dust");
+ }
+ else {
+ changePixel(pixel,"rotten_meat");
+ }
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","meat","rotten_meat","cooked_meat","flesh"], chance:0.2 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.scales = {
+ color: "#6b839a",
+ category: "biology",
+ behavior: behaviors.WALL,
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (pixel.temp > 40 && Math.random() < 0.1) {
+ pixel.temp -= 1;
+ }
+ doDefaults(pixel);
+ if (Math.random() > 0.92 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ if (Math.random() < 0.1) {
+ changePixel(pixel,"calcium");
+ }
+ else {
+ changePixel(pixel,"dust");
+ }
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 210,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.000075 },
+ "radiation": { elem1:["calcium","calcium","ash","meat","rotten_meat","cooked_meat","skin","real_skin"], chance:0.1 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.flesh = {
+ color: ["#9e4839","#ba6449"],
+ category: "biology",
+ behavior: behaviors.WALL,
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.92 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","blood","fat","meat","rotten_meat","cooked_meat"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.eye = {
+ color: "#451800",
+ category: "biology",
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ doHeat(pixel);
+ doBurning(pixel);
+ doElectricity(pixel);
+ if (Math.random() > 0.895 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ if (!isEmpty(pixel.x, pixel.y-1, true)) {
+ var hitPixel = pixelMap[pixel.x][pixel.y-1]
+ doElectricity(hitPixel);
+ if (elements[hitPixel.element].id === elements.light.id && Math.random() > 0.5) {
+ pixel.saw = true
+ }
+ else if (pixel.saw === true && elements[hitPixel.element].id === elements.eye.id && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ pixel.saw = false
+ hitPixel.saw = true
+ }
+ else if (pixel.saw === true && elements[hitPixel.element].id === elements.eye_nerve.id && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ if (!hitPixel.charge) {
+ hitPixel.charge = 0.1
+ }
+ else if (hitPixel.charge) {
+ hitPixel.charge += 0.1
+ }
+ pixel.saw = false
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x, pixel.y+1, true)) {
+ var hitPixel = pixelMap[pixel.x][pixel.y+1]
+ doElectricity(hitPixel);
+ if (elements[hitPixel.element].id === elements.light.id && Math.random() > 0.5) {
+ pixel.saw = true
+ }
+ else if (pixel.saw === true && elements[hitPixel.element].id === elements.eye.id && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ pixel.saw = false
+ hitPixel.saw = true
+ }
+ else if (pixel.saw === true && elements[hitPixel.element].id === elements.eye_nerve.id && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ if (!hitPixel.charge) {
+ hitPixel.charge = 0.1
+ }
+ else if (hitPixel.charge) {
+ hitPixel.charge += 0.1
+ }
+ pixel.saw = false
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x-1, pixel.y, true)) {
+ var hitPixel = pixelMap[pixel.x-1][pixel.y]
+ doElectricity(hitPixel);
+ if (elements[hitPixel.element].id === elements.light.id && Math.random() > 0.5) {
+ pixel.saw = true
+ }
+ else if (pixel.saw === true && elements[hitPixel.element].id === elements.eye.id && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ pixel.saw = false
+ hitPixel.saw = true
+ }
+ else if (pixel.saw === true && elements[hitPixel.element].id === elements.eye_nerve.id && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ if (!hitPixel.charge) {
+ hitPixel.charge = 0.1
+ }
+ else if (hitPixel.charge) {
+ hitPixel.charge += 0.1
+ }
+ pixel.saw = false
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x+1, pixel.y, true)) {
+ var hitPixel = pixelMap[pixel.x+1][pixel.y]
+ doElectricity(hitPixel);
+ if (elements[hitPixel.element].id === elements.light.id && Math.random() > 0.5) {
+ pixel.saw = true
+ }
+ else if (pixel.saw === true && elements[hitPixel.element].id === elements.eye.id && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ pixel.saw = false
+ hitPixel.saw = true
+ }
+ else if (pixel.saw === true && elements[hitPixel.element].id === elements.eye_nerve.id && Math.random() > (1 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ if (!hitPixel.charge) {
+ hitPixel.charge = 0.1
+ }
+ else if (hitPixel.charge) {
+ hitPixel.charge += 0.1
+ }
+ pixel.saw = false
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ tempHigh: 200,
+ stateHigh: ["cooked_meat","salt_water","blood"],
+ tempLow: -25,
+ stateLow: "salt_water",
+ burn: 10,
+ burnTime: 250,
+ conduct: .05,
+ burnInto: ["cooked_meat","salt_water","blood"],
+ breakInto: ["blood","blood","blood","blood","cerebrospinal_fluid","cerebrospinal_fluid","salt_water","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ saw: false,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.brain = {
+ color: ["#fce3e3","#deb6c5","#f5ced5","#e87b8f"],
+ category: "biology",
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ doHeat(pixel);
+ doBurning(pixel);
+ doElectricity(pixel);
+ if (Math.random() > 0.85 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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() > (1.25 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ if (!hitPixel.charge) {
+ hitPixel.charge = 0.1
+ }
+ else if (hitPixel.charge) {
+ hitPixel.charge += 0.1
+ }
+ pixel.chargeCD = 8
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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() > (1.25 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ if (!hitPixel.charge) {
+ hitPixel.charge = 0.1
+ }
+ else if (hitPixel.charge) {
+ hitPixel.charge += 0.1
+ }
+ pixel.chargeCD = 8
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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() > (1.25 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ if (!hitPixel.charge) {
+ hitPixel.charge = 0.1
+ }
+ else if (hitPixel.charge) {
+ hitPixel.charge += 0.1
+ }
+ pixel.chargeCD = 8
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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() > (1.25 - ((pixel.nutrition + pixel.oxygen) / 2000))) {
+ if (!hitPixel.charge) {
+ hitPixel.charge = 0.1
+ }
+ else if (hitPixel.charge) {
+ hitPixel.charge += 0.1
+ }
+ pixel.chargeCD = 8
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .5,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.amygdala = {
+ color: ["#B33E93","#B33E93","#f5ced5","#e87b8f"],
+ category: "biology",
+ behavior: behaviors.WALL,
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ doHeat(pixel);
+ doBurning(pixel);
+ doElectricity(pixel);
+ if (Math.random() > 0.895 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (pixel.temp > 35) { pixel.temp -= 1; }
+ else if (pixel.temp < 15) { pixel.temp += 1; }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .8,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.eye_nerve = {
+ color: "#B33E93",
+ category: "biology",
+ behavior: behaviors.WALL,
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.895 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .8,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.nerve = {
+ color: "#B33E93",
+ category: "biology",
+ behavior: behaviors.WALL,
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.895 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .8,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.throat_lining = {
+ color: "#bc6157",
+ category: "biology",
+ behavior: [
+ "XX|DL:stomach_acid%5|XX",
+ "DL:stomach_acid%5|XX|DL:stomach_acid%5",
+ "XX|DL:stomach_acid%5|XX",
+ ],
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.9 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","slime","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ isBio: true,
+ movable: false,
+}
+
+elements.intestines = {
+ color: "#bc6157",
+ category: "biology",
+ behavior: behaviors.WALL,
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.9 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ if (!isEmpty(pixel.x, pixel.y-1, true)) {
+ var hitPixel = pixelMap[pixel.x][pixel.y-1]
+ if (elements[hitPixel.element].id === elements.digested_material.id && Math.random() > 0.95) {
+ changePixel(hitPixel,"poop");
+ pixel.nutrition += (hitPixel.nutrition / 10)
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.25) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x, pixel.y+1, true)) {
+ var hitPixel = pixelMap[pixel.x][pixel.y+1]
+ if (elements[hitPixel.element].id === elements.digested_material.id && Math.random() > 0.95) {
+ changePixel(hitPixel,"poop");
+ pixel.nutrition += (hitPixel.nutrition / 10)
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.25) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x-1, pixel.y, true)) {
+ var hitPixel = pixelMap[pixel.x-1][pixel.y]
+ if (elements[hitPixel.element].id === elements.digested_material.id && Math.random() > 0.95) {
+ changePixel(hitPixel,"poop");
+ pixel.nutrition += (hitPixel.nutrition / 10)
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.25) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x+1, pixel.y, true)) {
+ var hitPixel = pixelMap[pixel.x+1][pixel.y]
+ if (elements[hitPixel.element].id === elements.digested_material.id && Math.random() > 0.95) {
+ changePixel(hitPixel,"poop");
+ pixel.nutrition += (hitPixel.nutrition / 10)
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.25) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ 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,
+ },
+ movable: false,
+ isBio: true
+}
+
+elements.lungs = {
+ color: "#d4aaab",
+ category: "biology",
+ behavior: behaviors.WALL,
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.9 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ if (!isEmpty(pixel.x, pixel.y-1, true)) {
+ var hitPixel = pixelMap[pixel.x][pixel.y-1]
+ if (elements[hitPixel.element].id === elements.oxygen.id && Math.random() > 0.95) {
+ if (Math.random() > 0.75) {
+ changePixel(hitPixel,"carbon_dioxide");
+ }
+ pixel.oxygen += 100
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x, pixel.y+1, true)) {
+ var hitPixel = pixelMap[pixel.x][pixel.y+1]
+ if (elements[hitPixel.element].id === elements.oxygen.id && Math.random() > 0.95) {
+ if (Math.random() > 0.75) {
+ changePixel(hitPixel,"carbon_dioxide");
+ }
+ pixel.oxygen += 100
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x-1, pixel.y, true)) {
+ var hitPixel = pixelMap[pixel.x-1][pixel.y]
+ if (elements[hitPixel.element].id === elements.oxygen.id && Math.random() > 0.95) {
+ if (Math.random() > 0.75) {
+ changePixel(hitPixel,"carbon_dioxide");
+ }
+ pixel.oxygen += 100
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ if (!isEmpty(pixel.x+1, pixel.y, true)) {
+ var hitPixel = pixelMap[pixel.x+1][pixel.y]
+ if (elements[hitPixel.element].id === elements.oxygen.id && Math.random() > 0.95) {
+ if (Math.random() > 0.75) {
+ changePixel(hitPixel,"carbon_dioxide");
+ }
+ pixel.oxygen += 100
+ }
+ else if (elements[hitPixel.element].isBio === true && Math.random() > 0.5) {
+ if (hitPixel.oxygen < pixel.oxygen) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","carbon_dioxide","meat","rotten_meat","cooked_meat","flesh","ash","carbon_dioxide","meat","rotten_meat","cooked_meat","flesh","ash","oxygen","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ movable: false,
+ isBio: true
+}
+
+elements.gills = {
+ color: "#5EBAE3",
+ category: "biology",
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.9 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ else if (elements[hitPixel.element].id === elements.deoxygenated_water.id && Math.random() > 0.75) {
+ if (!tryMove(hitPixel,pixel.x,pixel.y+1)) {
+ if (elements[pixelMap[pixel.x][pixel.y+1].element].state === "liquid") {
+ swapPixels(hitPixel,pixelMap[pixel.x][pixel.y+1])
+ }
+ }
+ }
+ else if (elements[hitPixel.element].id === elements.water.id && Math.random() > 0.75) {
+ pixel.oxygen += 100
+ if (Math.random() > 0.75) {
+ changePixel(hitPixel,"deoxygenated_water")
+ }
+ if (!tryMove(hitPixel,pixel.x,pixel.y+1)) {
+ if (elements[pixelMap[pixel.x][pixel.y+1].element].state === "liquid") {
+ swapPixels(hitPixel,pixelMap[pixel.x][pixel.y+1])
+ }
+ }
+ }
+ else if (elements[hitPixel.element].id === elements.salt_water.id && Math.random() > 0.75) {
+ pixel.oxygen += 90
+ if (Math.random() > 0.85) {
+ changePixel(hitPixel,"deoxygenated_water")
+ }
+ if (!tryMove(hitPixel,pixel.x,pixel.y+1)) {
+ if (elements[pixelMap[pixel.x][pixel.y+1].element].state === "liquid") {
+ swapPixels(hitPixel,pixelMap[pixel.x][pixel.y+1])
+ }
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ else if (elements[hitPixel.element].id === elements.deoxygenated_water.id && Math.random() > 0.75) {
+ if (isEmpty(pixel.x+1, pixel.y)) {
+ tryMove(hitPixel,pixel.x+1,pixel.y);
+ }
+ }
+ else if (elements[hitPixel.element].id === elements.water.id && Math.random() > 0.75) {
+ if (isEmpty(pixel.x+1, pixel.y)) {
+ pixel.oxygen += 100
+ if (Math.random() > 0.75) {
+ changePixel(hitPixel,"deoxygenated_water")
+ }
+ tryMove(hitPixel,pixel.x+1,pixel.y);
+ }
+ }
+ else if (elements[hitPixel.element].id === elements.salt_water.id && Math.random() > 0.75) {
+ if (isEmpty(pixel.x+1, pixel.y)) {
+ pixel.oxygen += 90
+ if (Math.random() > 0.85) {
+ changePixel(hitPixel,"deoxygenated_water")
+ }
+ tryMove(hitPixel,pixel.x+1,pixel.y);
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","steam","oxygen","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ movable: false,
+ isBio: true
+}
+
+elements.stomach_lining = {
+ color: "#be5c4b",
+ category: "biology",
+ behavior: [
+ "XX|CR:stomach_acid%5|XX",
+ "CR:stomach_acid%5|XX|CR:stomach_acid%5",
+ "XX|CR:stomach_acid%5|XX",
+ ],
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.9 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ 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,
+ },
+ movable: false,
+ isBio: true
+}
+
+elements.explosive_stomach = {
+ color: "#AA9167",
+ category: "biology",
+ behavior: [
+ "XX|CR:explosive_acid%5|XX",
+ "CR:explosive_acid%5|XX|CR:explosive_acid%5",
+ "XX|CR:explosive_acid%5|XX",
+ ],
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.9 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ 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,
+ },
+ movable: false,
+ isBio: true
+}
+
+elements.stomach_valve = {
+ color: "#c8846f",
+ category: "biology",
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.9 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ else if (elements[hitPixel.element].id === elements.digested_material.id && Math.random() > 0.75) {
+ if (isEmpty(pixel.x, pixel.y+1)) {
+ tryMove(hitPixel,pixel.x,pixel.y+1);
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ 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,
+ },
+ movable: false,
+ isBio: true
+}
+
+elements.sphincter = {
+ color: "#c8846f",
+ category: "biology",
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.9 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"rotten_meat");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ else if (elements[hitPixel.element].id === elements.poop.id && Math.random() > 0.75) {
+ if (isEmpty(pixel.x, pixel.y+1)) {
+ tryMove(hitPixel,pixel.x,pixel.y+1);
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ density: 2710,
+ state: "solid",
+ conduct: .05,
+ tempHigh: 200,
+ stateHigh: "cooked_meat",
+ tempLow: -25,
+ stateLow: "frozen_meat",
+ burn: 10,
+ burnTime: 250,
+ burnInto: "cooked_meat",
+ breakInto: ["blood","meat"],
+ forceSaveColor: true,
+ reactions: {
+ "cancer": { elem1:"cancer", chance:0.0005 },
+ "radiation": { elem1:["ash","steam","poop","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 },
+ },
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ movable: false,
+ isBio: true
+}
+
+elements.digested_material = {
+ color: "#B5C306",
+ behavior: [
+ "XX|XX|XX",
+ "SW:stomach_acid,explosive_acid%3 AND M2%25|XX|SW:stomach_acid,explosive_acid%3 AND M2%25",
+ "SW:stomach_acid,explosive_acid%5 AND M2%50|SW:stomach_acid,explosive_acid%10 AND M1|SW:stomach_acid,explosive_acid%5 AND M2%50",
+ ],
+ properties: {
+ nutrition: 100,
+ },
+ category: "biology",
+ state: "solid",
+ density: 200,
+ conduct: 0.25,
+ stain: 0.01,
+ darkText: true,
+ tempHigh: 90,
+ stateHigh: "dirty_water",
+ tempLow: -30,
+ stateLow: "dirty_ice",
+}
+
+elements.poop = {
+ color: "#593001",
+ behavior: behaviors.LIQUID,
+ reactions: {
+ "water": { elem1:null, elem2:"dirty_water", chance:0.02 },
+ "salt_water": { elem1:null, elem2:"dirty_water", chance:0.02 },
+ "sugar_water": { elem1:null, elem2:"dirty_water", chance:0.02 },
+ "plant": { elem2:"dead_plant", chance:0.02},
+ },
+ category: "biology",
+ state: "liquid",
+ viscosity: 1000,
+ density: 200,
+ conduct: 0.25,
+ darkText: true,
+ tempHigh: 160,
+ stateHigh: ["ash","ash","carbon_dioxide"],
+ burn: 5,
+ burnTime: 30,
+ burnInto: ["ash","ash","carbon_dioxide","fire","fire"],
+ tempLow: -30,
+ stain: 0.03,
+ stateLowName: "frozen_poop",
+}
+
+elements.stomach_acid = {
+ color: ["#b5cf91","#288f2a"],
+ behavior: [
+ "XX|DB%1|XX",
+ "DB%1 AND M2|DL%0.005|DB%1 AND M2",
+ "DB%1 AND M2|DB%2 AND M1|DB%1 AND M2",
+ ],
+ ignore: ["throat_lining","explosive_stomach","stomach_lining","stomach_valve","slime","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: {
+ "water": { elem1:null, elem2:"dirty_water", chance:0.02 },
+ "salt_water": { elem1:null, elem2:"water", chance:0.02 },
+ "sugar_water": { elem1:null, elem2:"water", chance:0.02 },
+ "plant": { elem2:"digested_material", attr2:{"nutrition":"10"}, chance:0.02},
+ "tree_branch": { elem1:null, elem2:"wood", chance:0.02 },
+ "sugar": { elem2:"digested_material", attr2:{"nutrition":"30"}, chance:0.02 },
+ "dead_plant": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "meat": { elem2:"digested_material", attr2:{"nutrition":"30"}, chance:0.02 },
+ "cooked_meat": { elem2:"digested_material", attr2:{"nutrition":"60"}, chance:0.02 },
+ "rotten_meat": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":"-10"}, chance:0.02 },
+ "cured_meat": { elem2:"digested_material", attr2:{"nutrition":"50"}, chance:0.02 },
+ "cheese": { 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 },
+ "toast": { elem2:"digested_material", attr2:{"nutrition":"40"}, chance:0.02 },
+ "bread": { elem2:"digested_material", attr2:{"nutrition":"40"}, chance:0.02 },
+ "hard_yolk": { elem2:"digested_material", attr2:{"nutrition":"40"}, chance:0.02 },
+ "yolk": { elem2:"digested_material", attr2:{"nutrition":"-10"}, chance:0.02 },
+ "milk": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "crumb": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "pickle": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "salt": { elem2:"digested_material", attr2:{"nutrition":"5"}, 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":"-15"}, chance:0.02 },
+ "soda": { elem2:"digested_material", attr2:{"nutrition":"20"}, chance:0.02 },
+ "sap": { elem2:"digested_material", attr2:{"nutrition":"-5"}, chance:0.02 },
+ "juice": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "mayo": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "nut_butter": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "ketchup": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "jelly": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "bleach": { elem2:"digested_material", attr2:{"nutrition":"-500"}, chance:0.02 },
+ "poison": { elem2:"digested_material", attr2:{"nutrition":"-750"}, chance:0.02 },
+ "soap": { elem2:"digested_material", attr2:{"nutrition":"-20"}, chance:0.02 },
+ "mercury": { elem2:"digested_material", attr2:{"nutrition":"-500"}, 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 },
+ "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":"15"}, chance:0.02 },
+ "melted_cheese": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "melted_chocolate": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "melted_butter": { elem2:"digested_material", attr2:{"nutrition":"10"}, chance:0.02 },
+ "chocolate": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "rice": { elem2:"digested_material", attr2:{"nutrition":"35"}, 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":"45"}, chance:0.02 },
+ "ice_cream": { elem2:"digested_material", attr2:{"nutrition":"40"}, chance:0.02 },
+ "cream": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "caramel": { elem2:"digested_material", attr2:{"nutrition":"30"}, chance:0.02 },
+ "potato": { elem2:"digested_material", attr2:{"nutrition":"15"}, 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":"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":"-35"}, chance:0.02 },
+ "honey": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "blood": { elem2:"digested_material", attr2:{"nutrition":"-5"}, chance:0.02 },
+ "infection": { elem2:"digested_material", attr2:{"nutrition":"-15"}, chance:0.02 },
+ "cancer": { elem2:"digested_material", attr2:{"nutrition":"-15"}, chance:0.02 },
+ "plague": { elem2:"digested_material", attr2:{"nutrition":"-15"}, chance:0.02 },
+ "glue": { elem2:"digested_material", attr2:{"nutrition":"-10"}, chance:0.02 },
+ },
+ category: "biology",
+ tempHigh: 110,
+ stateHigh: "acid_gas",
+ tempLow: -58.88,
+ burn: 30,
+ burnTime: 1,
+ state: "liquid",
+ density: 1049,
+ stain: -0.1
+}
+
+elements.explosive_acid = {
+ color: ["#E9DC8C","#D0C15A"],
+ behavior: [
+ "XX|DB%1|XX",
+ "DB%1 AND M2|DL%0.001|DB%1 AND M2",
+ "DB%1 AND M2|DB%2 AND M1|DB%1 AND M2",
+ ],
+ ignore: ["throat_lining","explosive_stomach","stomach_valve","slime","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: {
+ "water": { elem1:null, elem2:"dirty_water", chance:0.02 },
+ "salt_water": { elem1:null, elem2:"water", chance:0.02 },
+ "sugar_water": { elem1:null, elem2:"water", chance:0.02 },
+ "plant": { elem2:"digested_material", attr2:{"nutrition":"10"}, chance:0.02},
+ "tree_branch": { elem1:null, elem2:"wood", chance:0.02 },
+ "sugar": { elem2:"digested_material", attr2:{"nutrition":"30"}, chance:0.02 },
+ "dead_plant": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "meat": { elem2:"digested_material", attr2:{"nutrition":"30"}, chance:0.02 },
+ "cooked_meat": { elem2:"digested_material", attr2:{"nutrition":"60"}, chance:0.02 },
+ "rotten_meat": { elem2:["digested_material","ammonia",null,null,null], attr2:{"nutrition":"30"}, chance:0.02 },
+ "cured_meat": { elem2:"digested_material", attr2:{"nutrition":"50"}, chance:0.02 },
+ "cheese": { 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 },
+ "toast": { elem2:"digested_material", attr2:{"nutrition":"40"}, chance:0.02 },
+ "bread": { elem2:"digested_material", attr2:{"nutrition":"40"}, chance:0.02 },
+ "hard_yolk": { elem2:"digested_material", attr2:{"nutrition":"40"}, chance:0.02 },
+ "yolk": { elem2:"digested_material", attr2:{"nutrition":"10"}, chance:0.02 },
+ "milk": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "crumb": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "pickle": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "salt": { elem2:"digested_material", attr2:{"nutrition":"5"}, 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":"20"}, chance:0.02 },
+ "sap": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "juice": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "mayo": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "nut_butter": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "ketchup": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "jelly": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "bleach": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "poison": { elem2:"digested_material", attr2:{"nutrition":"20"}, chance:0.02 },
+ "soap": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "mercury": { elem2:"digested_material", attr2:{"nutrition":"5"}, 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 },
+ "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":"15"}, chance:0.02 },
+ "melted_cheese": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "melted_chocolate": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "melted_butter": { elem2:"digested_material", attr2:{"nutrition":"10"}, chance:0.02 },
+ "chocolate": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "rice": { elem2:"digested_material", attr2:{"nutrition":"35"}, 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":"45"}, chance:0.02 },
+ "ice_cream": { elem2:"digested_material", attr2:{"nutrition":"40"}, chance:0.02 },
+ "cream": { elem2:"digested_material", attr2:{"nutrition":"25"}, chance:0.02 },
+ "caramel": { elem2:"digested_material", attr2:{"nutrition":"30"}, chance:0.02 },
+ "potato": { elem2:"digested_material", attr2:{"nutrition":"15"}, 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":"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 },
+ "honey": { elem2:"digested_material", attr2:{"nutrition":"35"}, chance:0.02 },
+ "blood": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "infection": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "cancer": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "plague": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ "glue": { elem2:"digested_material", attr2:{"nutrition":"5"}, chance:0.02 },
+ },
+ category: "biology",
+ tempHigh: 600,
+ stateHigh: "pop",
+ burn: 100,
+ burnTime: 1,
+ burnInto: "explosion",
+ breakInto: ["explosion","pop"],
+ viscosity: 36,
+ tempLow: -58.88,
+ burn: 30,
+ burnTime: 1,
+ state: "liquid",
+ density: 1049,
+}
+
+elements.deoxygenated_water = {
+ color: "#829BD4",
+ behavior: behaviors.LIQUID,
+ tempHigh: 100,
+ stateHigh: "steam",
+ tempLow: 0,
+ stateLow: "ice",
+ category: "liquids",
+ heatCapacity: 4.184,
+ reactions: {
+ "oxygen": { elem1: "water", elem2: null },
+ "dust": { elem1: "dirty_water", elem2: null },
+ "ash": { elem1: "dirty_water", elem2: null },
+ "cyanide": { elem1: "dirty_water", elem2: null },
+ "cyanide_gas": { elem1: "dirty_water", elem2: null },
+ "carbon_dioxide": { elem1: "seltzer", elem2: null, oneway:true },
+ "sulfur": { elem1: "dirty_water", elem2: null },
+ "rat": { elem1: "dirty_water", chance:0.005 },
+ "plague": { elem1: "dirty_water", elem2: null },
+ "rust": { elem1: "dirty_water", chance:0.005 },
+ "lead": { elem1: "dirty_water", chance:0.005 },
+ "solder": { elem1: "dirty_water", chance:0.005 },
+ "fallout": { elem1: "dirty_water", chance:0.25 },
+ "radiation": { elem1: "dirty_water", chance:0.25 },
+ "uranium": { elem1: "dirty_water", chance:0.25 },
+ "rad_steam": { elem1: "dirty_water", chance:0.02 },
+ "rad_glass": { elem1: "dirty_water", chance:0.005 },
+ "rad_shard": { elem1: "dirty_water", chance:0.01 },
+ "rotten_meat": { elem1: "dirty_water", chance:0.25 },
+ "rotten_cheese": { elem1: "dirty_water", chance:0.25 },
+ "cancer": { elem1: "dirty_water", chance:0.25 },
+ "oil": { elem1: "dirty_water", chance:0.005 },
+ "dioxin": { elem1: "dirty_water", chance:0.1 },
+ "rock": { elem2: "wet_sand", chance: 0.00035 },
+ "limestone": { elem2: "wet_sand", chance: 0.00035 },
+ "tuff": { elem2: "wet_sand", color2:"#7a6b5c", chance: 0.00035 },
+ "ruins": { elem2: "rock", chance: 0.00035 },
+ "mudstone": { elem2: "mud", chance: 0.00035 },
+ "fly": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "firefly": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "bee": { elem2:"dead_bug", chance:0.05, oneway:true },
+ "stink_bug": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "cured_meat": { elem1:"salt_water", elem2:"meat" },
+ "water": { elem1:"water", chance:0.005 },
+ "salt_water": { elem1:"water", chance:0.005 },
+ "deoxygenated_water": { elem2:"bubble", attr2:{"clone":"water"}, chance:0.001, tempMin:85 },
+ },
+ state: "liquid",
+ density: 1100,
+ conduct: 0.02,
+ stain: -0.5,
+ extinguish: true
+}
+
+elements.real_bone = {
+ color: "#d9d9d9",
+ behavior: behaviors.WALL,
+ reactions: {
+ "water": { elem2:"broth", tempMin:70 },
+ "salt_water": { elem2:"broth", tempMin:70 },
+ "sugar_water": { elem2:"broth", tempMin:70 },
+ "seltzer": { elem2:"broth", tempMin:70 },
+ },
+ hoverStat: function(pixel) {
+ return "Nutr:"+pixel.nutrition+" O2:"+pixel.oxygen
+ },
+ tick: function(pixel) {
+ if (Math.random() > 0.95 && pixel.nutrition > 0 && pixel.oxygen > 0) {
+ pixel.nutrition--
+ pixel.oxygen--
+ }
+ if (Math.random() > 0.5 && (pixel.nutrition < 1 || pixel.oxygen < 1)) {
+ changePixel(pixel,"bone");
+ }
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ category:"biology",
+ tempHigh: 260,
+ stateHigh: "bone",
+ tempLow: -36,
+ stateLow: "bone",
+ state: "solid",
+ density: 1900,
+ hardness: 0.5,
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ breakInto: ["quicklime","quicklime","quicklime","blood","bone","bone","bone","bone","bone","bone"],
+ movable: false,
+ isBio: true
+}
+
+elements.cerebrospinal_fluid = {
+ color: "#CBC3E3",
+ behavior: behaviors.LIQUID,
+ tick: function(pixel) {
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 10
+ pixel.oxygen -= 10
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 10
+ pixel.nutrition -= 10
+ }
+ }
+ }
+ },
+ tempHigh: 102,
+ stateHigh: ["steam","salt"],
+ tempLow: -5,
+ category: "biology",
+ reactions: {
+ "dust": { elem1: "dirty_water", elem2: null },
+ "ash": { elem1: "dirty_water", elem2: null },
+ "carbon_dioxide": { elem1: "dirty_water", elem2: null },
+ "sulfur": { elem1: "dirty_water", elem2: null },
+ "rat": { elem1: "dirty_water", chance:0.005 },
+ "plague": { elem1: "dirty_water", elem2: null },
+ "fallout": { elem1: "dirty_water", chance:0.25 },
+ "radiation": { elem1: "dirty_water", chance:0.25 },
+ "rust": { elem1: "dirty_water", chance:0.005 },
+ "lead": { elem1: "dirty_water", chance:0.005 },
+ "solder": { elem1: "dirty_water", chance:0.005 },
+ "rock": { elem2: "wet_sand", chance: 0.0005 },
+ "limestone": { elem2: "wet_sand", chance: 0.0005 },
+ "fly": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "firefly": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "bee": { elem2:"dead_bug", chance:0.05, oneway:true },
+ "stink_bug": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "cancer": { elem1: "dirty_water", chance:0.25 },
+ "oil": { elem1: "dirty_water", chance:0.005 },
+ "uranium": { elem1: "dirty_water", chance:0.25 },
+ "wet_sand": { oneway:true, chance:0.007, func:function(pixel){
+ if (isEmpty(pixel.x,pixel.y-1) || isEmpty(pixel.x,pixel.y-2) || isEmpty(pixel.x,pixel.y-3)) {
+ changePixel(pixel,"foam");
+ pixel.clone = "salt_water";
+ }
+ }},
+ "salt_water": { elem2:"bubble", attr2:{"clone":"salt_water"}, chance:0.001, tempMin:85 },
+ // electrolysis:
+ "aluminum": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.0025 },
+ "zinc": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.015 },
+ "steel": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.0125 },
+ "iron": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.0125 },
+ "tin": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.01 },
+ "brass": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.001 },
+ "bronze": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.001 },
+ "copper": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.0075 },
+ "silver": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.0075 },
+ "gold": { elem1:["hydrogen","hydrogen","oxygen","chlorine"], charged:true, chance:0.0075 },
+ },
+ state: "liquid",
+ density: 1026,
+ stain: -0.01,
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ extinguish: true,
+ isBio: true
+}
+
+elements.elixir = {
+ color: "#8CB6AA",
+ behavior: behaviors.LIQUID,
+ reactions: {
+ "dirt": { elem2: "mud", elem1: null },
+ "dust": { elem1: "dirty_water", elem2: null },
+ "ash": { elem1: "dirty_water", elem2: null },
+ "carbon_dioxide": { elem1: "dirty_water", elem2: null },
+ "sulfur": { elem1: "dirty_water", elem2: null },
+ "rat": { elem1: "dirty_water", chance:0.005 },
+ "plague": { elem1: "dirty_water", elem2: null },
+ "fallout": { elem1: "dirty_water", chance:0.25 },
+ "radiation": { elem1: "dirty_water", chance:0.25 },
+ "rust": { elem1: "dirty_water", chance:0.005 },
+ "lead": { elem1: "dirty_water", chance:0.005 },
+ "solder": { elem1: "dirty_water", chance:0.005 },
+ "rock": { elem2: "wet_sand", chance: 0.0005 },
+ "limestone": { elem2: "wet_sand", chance: 0.0005 },
+ "fly": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "firefly": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "bee": { elem2:"dead_bug", chance:0.05, oneway:true },
+ "stink_bug": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "cancer": { elem1: "dirty_water", chance:0.25 },
+ "oil": { elem1: "dirty_water", chance:0.005 },
+ "uranium": { elem1: "dirty_water", chance:0.25 },
+ "cerebrospinal_fluid": { elem1:"brain_jar_juice", elem2:"brain_jar_juice", chance:0.01 },
+ },
+ viscosity: 4000,
+ tempHigh: 120,
+ stateHigh: ["steam","steam","dna","dna","sugar","salt",],
+ tempLow: 0,
+ category:"biology",
+ state: "liquid",
+ density: 1450,
+ stain: 0.05,
+ hidden: true,
+}
+
+elements.brain_jar_juice = {
+ color: "#4F8C24",
+ behavior: behaviors.LIQUID,
+ hidden: true,
+ tick: function(pixel) {
+ if (pixel.nutrition === null || isNaN(pixel.nutrition)) {
+ pixel.nutrition = 500
+ }
+ if (pixel.oxygen === null || isNaN(pixel.oxygen)) {
+ pixel.oxygen = 500
+ }
+ 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) {
+ hitPixel.oxygen += 1
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 1
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 1
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 1
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 1
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 1
+ }
+ }
+ }
+ 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) {
+ hitPixel.oxygen += 1
+ }
+ if (hitPixel.nutrition < pixel.nutrition) {
+ hitPixel.nutrition += 1
+ }
+ }
+ }
+ },
+ tempHigh: 102,
+ stateHigh: ["steam","salt"],
+ tempLow: -5,
+ category: "biology",
+ reactions: {
+ "dust": { elem1: "dirty_water", elem2: null },
+ "ash": { elem1: "dirty_water", elem2: null },
+ "carbon_dioxide": { elem1: "dirty_water", elem2: null },
+ "sulfur": { elem1: "dirty_water", elem2: null },
+ "rat": { elem1: "dirty_water", chance:0.005 },
+ "plague": { elem1: "dirty_water", elem2: null },
+ "fallout": { elem1: "dirty_water", chance:0.25 },
+ "radiation": { elem1: "dirty_water", chance:0.25 },
+ "rust": { elem1: "dirty_water", chance:0.005 },
+ "lead": { elem1: "dirty_water", chance:0.005 },
+ "solder": { elem1: "dirty_water", chance:0.005 },
+ "rock": { elem2: "wet_sand", chance: 0.0005 },
+ "limestone": { elem2: "wet_sand", chance: 0.0005 },
+ "fly": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "firefly": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "bee": { elem2:"dead_bug", chance:0.05, oneway:true },
+ "stink_bug": { elem2:"dead_bug", chance:0.1, oneway:true },
+ "cancer": { elem1: "dirty_water", chance:0.25 },
+ "oil": { elem1: "dirty_water", chance:0.005 },
+ "uranium": { elem1: "dirty_water", chance:0.25 },
+ "wet_sand": { oneway:true, chance:0.007, func:function(pixel){
+ if (isEmpty(pixel.x,pixel.y-1) || isEmpty(pixel.x,pixel.y-2) || isEmpty(pixel.x,pixel.y-3)) {
+ changePixel(pixel,"foam");
+ pixel.clone = "salt_water";
+ }
+ }},
+ "brain_jar_juice": { elem2:"bubble", color2:"#81cf63", attr2:{"clone":"brain_jar_juice"}, chance:0.0001 },
+ },
+ state: "liquid",
+ density: 1026,
+ stain: -0.01,
+ properties: {
+ oxygen: 1000,
+ nutrition: 1000,
+ },
+ extinguish: true
+}
+
+if (!elements.cancer.reactions) { elements.cancer.reactions = {} }
+elements.cancer.reactions.flesh = { "elem2": "cancer", chance:0.005 };
+elements.cancer.reactions.real_skin = { "elem2": "cancer", chance:0.0002 };
+elements.cancer.reactions.scales = { "elem2": "cancer", chance:0.0001 };
+elements.cancer.reactions.real_bone = { "elem2": ["bone","bone","cancer"], chance:0.0001 };
+elements.cancer.reactions.lungs = { "elem2": "cancer", chance:0.005 };
+elements.cancer.reactions.gills = { "elem2": "cancer", chance:0.005 };
+elements.cancer.reactions.brain = { "elem2": "cancer", chance:0.005 };
+elements.cancer.reactions.nerve = { "elem2": "cancer", chance:0.005 };
+elements.cancer.reactions.eye_nerve = { "elem2": "cancer", chance:0.005 };
+elements.cancer.reactions.eye = { "elem2": "cancer", chance:0.005 };
+elements.cancer.reactions.sphincter = { "elem2": "cancer", chance:0.005 };
+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.stomach_lining = { "elem2": ["pop","cancer","cancer","cancer"], chance:0.003 };
+elements.cancer.reactions.throat_lining = { "elem2": "cancer", chance:0.005 };
+
+if (!elements.uranium.reactions) { elements.uranium.reactions = {} }
+elements.uranium.reactions.flesh = { "elem2": ["ash","blood","fat","meat","rotten_meat","cooked_meat"], chance:0.5 };
+elements.uranium.reactions.real_skin = { "elem2": ["cooked_meat","cancer","ash","skin","hair"], chance:0.1 };
+elements.uranium.reactions.scales = { "elem2": ["cooked_meat","cancer","ash","real_skin","skin","dust","calcium"], chance:0.1 };
+elements.uranium.reactions.real_bone = { "elem2": ["bone","bone","radiation"], chance:0.01 };
+elements.uranium.reactions.gills = { "elem2": ["ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 };
+elements.uranium.reactions.lungs = { "elem2": ["ash","carbon_dioxide","meat","rotten_meat","cooked_meat","flesh","ash","carbon_dioxide","meat","rotten_meat","cooked_meat","flesh","ash","oxygen","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 };
+elements.uranium.reactions.brain = { "elem2": ["ash","steam","salt","meat","rotten_meat","cooked_meat","flesh","cerebrospinal_fluid"], chance:0.5 };
+elements.uranium.reactions.amygdala = { "elem2": ["ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 };
+elements.uranium.reactions.nerve = { "elem2": ["ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 };
+elements.uranium.reactions.eye_nerve = { "elem2": ["ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 };
+elements.uranium.reactions.eye = { "elem2": ["ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 };
+elements.uranium.reactions.sphincter = { "elem2": ["ash","steam","poop","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 };
+elements.uranium.reactions.intestines = { "elem2": ["ash","steam","meat","rotten_meat","cooked_meat","flesh","ash","steam","meat","rotten_meat","cooked_meat","flesh","poop"], 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.explosive_stomach = { "elem2": ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh","pop"], chance:0.3 };
+elements.uranium.reactions.throat_lining = { "elem2": ["ash","slime","meat","rotten_meat","cooked_meat","flesh"], chance:0.5 };
+
+if (!elements.radiation.reactions) { elements.radiation.reactions = {} }
+elements.radiation.reactions.flesh = { "elem2": ["ash","blood","fat","meat","rotten_meat","cooked_meat","cancer","cancer"], chance:0.4 };
+elements.radiation.reactions.real_skin = { "elem2": ["cooked_meat","cancer","ash","skin","hair"], chance:0.1 };
+elements.radiation.reactions.real_bone = { "elem2": ["bone","bone","radiation"], chance:0.01 };
+elements.radiation.reactions.gills = { "elem2": ["ash","steam","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 };
+elements.radiation.reactions.lungs = { "elem2": ["cancer","ash","carbon_dioxide","meat","rotten_meat","cooked_meat","flesh","ash","carbon_dioxide","meat","rotten_meat","cooked_meat","flesh","ash","oxygen","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 };
+elements.radiation.reactions.brain = { "elem2": ["cancer","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh","cerebrospinal_fluid"], chance:0.4 };
+elements.radiation.reactions.amygdala = { "elem2": ["cancer","ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 };
+elements.radiation.reactions.nerve = { "elem2": ["cancer","ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 };
+elements.radiation.reactions.eye_nerve = { "elem2": ["cancer","ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 };
+elements.radiation.reactions.eye = { "elem2": ["cancer","ash","steam","salt","ash","steam","salt","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 };
+elements.radiation.reactions.sphincter = { "elem2": ["cancer","ash","steam","poop","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 };
+elements.radiation.reactions.intestines = { "elem2": ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh","ash","steam","meat","rotten_meat","cooked_meat","flesh","poop"], 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.explosive_stomach = { "elem2": ["cancer","ash","steam","meat","rotten_meat","cooked_meat","flesh","pop"], chance:0.3 };
+elements.radiation.reactions.throat_lining = { "elem2": ["cancer","ash","slime","meat","rotten_meat","cooked_meat","flesh"], chance:0.4 };
+
+if (!elements.plague.reactions) { elements.plague.reactions = {} }
+elements.plague.reactions.flesh = { "elem2": ["rotten_meat","plague","fat","meat","rotten_meat","plague","infection","infection"], chance:0.04 };
+elements.plague.reactions.real_skin = { "elem2": ["plague","infection","rotten_meat","skin","hair"], chance:0.1 };
+elements.plague.reactions.scales = { "elem2": ["plague","infection","rotten_meat","dust","skin","calcium"], chance:0.1 };
+elements.plague.reactions.real_bone = { "elem2": ["bone","bone","infection","plague"], chance:0.01 };
+elements.plague.reactions.gills = { "elem2": ["infection","steam","meat","rotten_meat","plague","flesh","plague"], chance:0.04 };
+elements.plague.reactions.lungs = { "elem2": ["infection","rotten_meat","carbon_dioxide","meat","rotten_meat","plague","flesh","rotten_meat","carbon_dioxide","meat","rotten_meat","plague","flesh","rotten_meat","oxygen","meat","rotten_meat","plague","flesh"], chance:0.04 };
+elements.plague.reactions.brain = { "elem2": ["infection","rotten_meat","steam","salt","meat","rotten_meat","plague","flesh","cerebrospinal_fluid"], chance:0.04 };
+elements.plague.reactions.amygdala = { "elem2": ["infection","rotten_meat","steam","salt","rotten_meat","steam","salt","meat","rotten_meat","plague","flesh"], chance:0.04 };
+elements.plague.reactions.nerve = { "elem2": ["infection","rotten_meat","steam","salt","rotten_meat","steam","salt","meat","rotten_meat","plague","flesh"], chance:0.04 };
+elements.plague.reactions.eye_nerve = { "elem2": ["infection","rotten_meat","steam","salt","rotten_meat","steam","salt","meat","rotten_meat","plague","flesh"], chance:0.04 };
+elements.plague.reactions.eye = { "elem2": ["infection","rotten_meat","steam","salt","rotten_meat","steam","salt","meat","rotten_meat","plague","flesh"], chance:0.04 };
+elements.plague.reactions.sphincter = { "elem2": ["infection","rotten_meat","steam","poop","meat","rotten_meat","plague","flesh"], chance:0.04 };
+elements.plague.reactions.intestines = { "elem2": ["infection","rotten_meat","steam","meat","rotten_meat","plague","flesh","rotten_meat","steam","meat","rotten_meat","plague","flesh","poop"], 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.explosive_stomach = { "elem2": ["infection","plague","steam","meat","rotten_meat","plague","flesh","pop"], chance:0.03 };
+elements.plague.reactions.throat_lining = { "elem2": ["infection","rotten_meat","slime","meat","rotten_meat","plague","flesh"], chance:0.04 };
+
+if (!elements.infection.reactions) { elements.infection.reactions = {} }
+elements.infection.reactions.flesh = { "elem2": ["rotten_meat","infection","fat","meat","rotten_meat","infection","infection","infection"], chance:0.04 };
+elements.infection.reactions.real_skin = { "elem2": ["infection","infection","rotten_meat","skin","hair"], chance:0.1 };
+elements.infection.reactions.scales = { "elem2": ["infection","infection","rotten_meat","dust","skin","calcium"], chance:0.1 };
+elements.infection.reactions.real_bone = { "elem2": ["bone","bone","infection","infection"], chance:0.01 };
+elements.infection.reactions.gills = { "elem2": ["infection","steam","meat","rotten_meat","infection","flesh","infection"], chance:0.04 };
+elements.infection.reactions.lungs = { "elem2": ["infection","rotten_meat","carbon_dioxide","meat","rotten_meat","infection","flesh","rotten_meat","carbon_dioxide","meat","rotten_meat","infection","flesh","rotten_meat","oxygen","meat","rotten_meat","infection","flesh"], chance:0.04 };
+elements.infection.reactions.brain = { "elem2": ["infection","rotten_meat","steam","salt","meat","rotten_meat","infection","flesh","cerebrospinal_fluid"], chance:0.04 };
+elements.infection.reactions.amygdala = { "elem2": ["infection","rotten_meat","steam","salt","rotten_meat","steam","salt","meat","rotten_meat","infection","flesh"], chance:0.04 };
+elements.infection.reactions.nerve = { "elem2": ["infection","rotten_meat","steam","salt","rotten_meat","steam","salt","meat","rotten_meat","infection","flesh"], chance:0.04 };
+elements.infection.reactions.eye_nerve = { "elem2": ["infection","rotten_meat","steam","salt","rotten_meat","steam","salt","meat","rotten_meat","infection","flesh"], chance:0.04 };
+elements.infection.reactions.eye = { "elem2": ["infection","rotten_meat","steam","salt","rotten_meat","steam","salt","meat","rotten_meat","infection","flesh"], chance:0.04 };
+elements.infection.reactions.sphincter = { "elem2": ["infection","rotten_meat","steam","poop","meat","rotten_meat","infection","flesh"], chance:0.04 };
+elements.infection.reactions.intestines = { "elem2": ["infection","rotten_meat","steam","meat","rotten_meat","infection","flesh","rotten_meat","steam","meat","rotten_meat","infection","flesh","poop"], chance:0.04 };
+elements.infection.reactions.stomach_valve = { "elem2": ["infection","rotten_meat","steam","meat","rotten_meat","infection","flesh"], chance:0.04 };
+elements.infection.reactions.stomach_lining = { "elem2": ["infection","rotten_meat","steam","meat","rotten_meat","infection","flesh"], chance:0.04 };
+elements.infection.reactions.explosive_stomach = { "elem2": ["infection","infection","steam","meat","rotten_meat","cooked_meat","flesh","pop"], chance:0.03 };
+elements.infection.reactions.throat_lining = { "elem2": ["infection","rotten_meat","slime","meat","rotten_meat","infection","flesh"], chance:0.04 };
+
+elements.dna.reactions.juice = { "elem1": null, "elem2": "elixir", chance:0.01 };
diff --git a/mods/eklegems.js b/mods/eklegems.js
new file mode 100644
index 00000000..6aac51e9
--- /dev/null
+++ b/mods/eklegems.js
@@ -0,0 +1,1124 @@
+elements.dirt.reactions.metal_scrap = {elem2:"normalPaydirt", elem1:"normalpaydirt"}
+elements.dirt.reactions.gold_coin = {elem2:"betterPaydirt", elem1:"betterpaydirt"}
+elements.dirt.reactions.uranium = {elem2:"goodPaydirt", elem1:"goodpaydirt"}
+elements.dirt.reactions.diamond = {elem2:"bestPaydirt", elem1:"bestpaydirt"}
+elements.sand.reactions.wet_sand = {elem2:"opal", elem1:"opal", chance: 0.0001, tempMin:40}
+elements.metal_scrap.reactions.oxygen = {elem2:"sapphire", elem1:"rock", chance: 0.0001, tempMin:700}
+elements.basalt.reactions.sand = {elem2:"emerald", elem1:"rock", chance: 0.0001, tempMin:700}
+elements.metal_scrap.reactions.rock = {elem2:"ruby", elem1:"rock", chance: 0.0001, tempMin:600}
+elements.rock.reactions.basalt = {elem1:"Topaz", chance: 0.0001, tempMin: 900}
+elements.sodium.reactions.metal_scrap = {elem1:"nephrite", chance: 0.001, tempMin: 60}
+elements.hydrogen.reactions.metal_scrap = {elem1:"jadite", chance: 0.001, tempMin: 60}
+elements.sand.reactions.sand = {elem1:"quartz", chance: 0.001, tempMin: 400}
+elements.salt_water.reactions.gravel = {elem1:"garnet", chance: 0.001, tempMin: 40}
+elements.dirty_water.reactions.basalt = {elem1:"zircon", chance: 0.01, tempMin: 40}
+elements.opal={
+ color:["#CCeeCC","#eeCCCC","#CCCCee","#eeeeee"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|CC:6e4e24%0.1,eeCCCC%1,CCeeCC%1,CCCCee%1,eeeeee%1|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","steam"],
+ tempHigh:"100",
+ reactions:{
+ "water":{elem1:"opal",elem2:"water"}
+ },
+ breakInto:"sand",
+ hardness: "60%"
+}
+elements.sapphire={
+ color:["#2b5c6e","#335b94","#4880D1","#3041D1","#4a36D1"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["metal_scrap","oxygen"],
+ tempHigh:"2040",
+ breakInto:["aluminium","oxygen"],
+ hardness: "80%"
+}
+elements.ruby={
+ color:["#d13032","#d14471","#ff5b90","#ff3c3f","#Eb9b9c"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["metal_scrap","chromium","oxygen"],
+ tempHigh:"2040",
+ breakInto:["aluminium","oxygen"],
+ hardness: "80%"
+}
+elements.emerald={
+ color:["#47d046","#59d999","#7Dd494","#43c846","#45b765"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["metal_scrap","beryllium","oxygen"],
+ tempHigh:"2519",
+ breakInto:["aluminium","oxygen"],
+ hardness: "60%"
+}
+elements.topaz={
+ color:["#fff3ba","#fDffcE","#fDE0ff","#DaEcff","#D7fff4"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["metal_scrap","hydrogen","oxygen"],
+ tempHigh:"1200",
+ breakInto:["gravel","oxygen"],
+ hardness: "70%"
+}
+elements.quartz={
+ color:["#fffDfb","#fffEE1","#D4D3bb","#ffEfDD","#ffE2bf"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","oxygen"],
+ tempHigh:"1725",
+ breakInto:["sand","oxygen"],
+ hardness: "60%",
+ reactions:{
+ "rust":{elem1:["citrine","citrine","citrine","citrine","amethyst"]},
+ "sand":{elem1:"agate", chance: 0.001},
+ },
+}
+elements.amethyst={
+ color:["#cfa2ff","#f2a2ff","#f6D8ff","#b479ED","#ca51f5"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","rust","oxygen","radiation","citrine"],
+ tempHigh:"1600",
+ breakInto:["sand","oxygen"],
+ hardness: "60%"
+}
+elements.citrine={
+ color:["#f5E1c3","#f5D7a3","#f5D07a","#f5ca59","#D19a23"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","rust","oxygen"],
+ tempHigh:"1750",
+ breakInto:["sand","oxygen"],
+ hardness: "60%",
+}
+elements.garnet={
+ color:["#ff8a01","#D64b07","#D6613D","#D66769"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","gravel","metal_scrap","rust","magnesium"],
+ tempHigh:"1300",
+ breakInto:["rust","magnesium"],
+ hardness: "60%"
+}
+elements.zircon={
+ color:["#b86142","#b8712c","#E08f25","#b3381b"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["gravel","oxygen","rust"],
+ tempHigh:"1300",
+ breakInto:["rust","gravel"],
+ hardness: "65%"
+}
+elements.agate={
+ color:["#b25D3f","#E8c6bb","#336baD","#8aaD94"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["gravel","quartz","amethyst"],
+ tempHigh:"1500",
+ breakInto:["sand","oxygen"],
+ hardness: "60%"
+}
+elements.laminar={
+ color:["#a7f9ff","#CCfbff","#8fffE2","#aCCfcE"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["slag","quartz","gravel"],
+ tempHigh:"700",
+ breakInto:["sand","oxygen","quartz"],
+ hardness: "60%"
+}
+elements.bloodstone={
+ color:["#56785b","#3a7848","#8baD71","#8a2828"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","quartz","gravel"],
+ tempHigh:"1230",
+ breakInto:["sand","quartz","rock"],
+ hardness: "60%"
+}
+elements.rutile={
+ color:["#8a743b","#c99c2f","#E8ab2a","#E88D35"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["titanium","oxygen","gravel"],
+ tempHigh:"1843",
+ breakInto:["titanium","oxygen"],
+ hardness: "60%"
+}
+elements.tigersEye={
+ color:["#4D3E1a","#c99c2f","#52381a","#E88D35"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rutile","quartz","gravel"],
+ tempHigh:"1700",
+ breakInto:["titanium","oxygen"],
+ hardness: "60%"
+}
+elements.onyx={
+ color:["#222222","#ffffff","#000000"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["gravel","quartz","agate"],
+ tempHigh:"200",
+ breakInto:["sand","oxygen"],
+ hardness: "60%"
+}
+elements.blackopal={
+ color:["#22CC22","#2222CC","#CC2222","#777722","#772277","#227777","#111111","#000000","#000000","#000000","#000000","#000000"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|CC:6e4e24%0.04,22CC22%1,22eeee%1,2222CC%1,111111%1,000000%1|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","steam"],
+ tempHigh:"100",
+ reactions:{
+ "water":{elem1:"blackopal",elem2:"water"}
+ },
+ breakInto:["sand","oxygen","water"],
+ hardness: "55%"
+}
+elements.fancysapphire={
+ color:["#DD97ff","#ffcf8b","#D2ffb0","#3041D1","#b2fffa"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["metal_scrap","oxygen"],
+ tempHigh:"2040",
+ breakInto:["aluminium","oxygen"],
+ hardness: "80%"
+}
+elements.carnelian={
+ color:["#aD3c3c","#D63131","#Eb3535"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|XX|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["metal_scrap","oxygen"],
+ tempHigh:"3000",
+ breakInto:["gravel","oxygen"],
+ hardness: "45%"
+}
+elements.nephrite={
+ color:["#EbEbEb","#E4EbD4","#D0EbCC"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|XX|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["calcium","sand","rust","oxygen","magnesium","hydrogen"],
+ tempHigh:"1060",
+ breakInto:["magnesium","oxygen","rust","calcium"],
+ hardness: "45%",
+ reactions:{
+ "calcium":{elem1:"jadite",chance: 0.001, tempmin: 80}
+ },
+}
+elements.jadite={
+ color:["#2a9E31","#499E5a","#649E74"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|XX|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sodium","oxygen","sand"],
+ tempHigh:"1040",
+ breakInto:["sodium","oxygen"],
+ hardness: "45%"
+}
+elements.titanium={
+ color:["#bCCED1","#D1D1D1","#E8E8E8"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|XX|XX"
+ ],
+ category:"solids",
+ state:"solid",
+ stateHigh:"moltentitanium",
+ tempHigh:"1668",
+ reactions:{
+ "oxygen":{elem1:"rutile",elem2:"oxygen"},
+ "water":{elem1:"rutile",elem2:"water"}
+ },
+ conduct: 0.47,
+}
+elements.moltentitanium={
+ color:["#E87D00","#E8Df00","#E83c00"],
+ behavior: [
+ "XX|cr:fire%5|XX",
+ "M2|XX|M2",
+ "M1|M1|M1"
+ ],
+ category:"states",
+ state:"liquid",
+ stateLow:"titanium",
+ tempLow:"1667",
+ conduct: 0.47,
+}
+elements.rawtanzanite={
+ color:["#6E4D1B","#6E5B1A","#6E5324","#6E5E2D","#6E4D1B","#6E5B1A","#6E5324","#6E5E2D","#6E4D1B","#6E5B1A","#6E5324","#6E5E2D","#6E4D1B","#6E5B1A","#6E5324","#6E5E2D","#6E4D1B","#6E5B1A","#6E5324","#6E5E2D","#6E4D1B","#6E5B1A","#6E5324","#6E5E2D","#7D7EAB","#D18D8E","#9CBDD1"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["tanzanite","mudstone"],
+ tempHigh:"700",
+ breakInto:["aluminium","calcium"],
+ hardness: "70%"
+}
+elements.tanzanite={
+ color:["#c474ff","#8176ff","#646Dff","#4258D6","#3344D6","#2937aD"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["aluminium","calcium"],
+ tempHigh:"2000",
+ breakInto:["aluminium","calcium"],
+ hardness: "70%"
+}
+elements.peridot={
+ color:["#3D9c32","#599c34","#6fc241","#7CC24c","#71aD53"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["magnesium","rust"],
+ tempHigh:"1400",
+ breakInto:["magnesium","rust"],
+ hardness: "60%"
+}
+elements.commontourmaline={
+ color:["#273828","#293834","#1a2421","#1f241b"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sodium","rust","magnesium","aluminium","raretourmaline"],
+ tempHigh:"1100",
+ breakInto:["magnesium","rust"],
+ hardness: "60%"
+}
+elements.raretourmaline={
+ color:["#4b963f","#658E96","#bf91D6","#a6D67f"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sodium","rust","magnesium","aluminium"],
+ tempHigh:"1100",
+ breakInto:["magnesium","rust"],
+ hardness: "60%"
+}
+elements.rawberyl={
+ color:["#D1D1D1","#E6E6E6","#E5E3D5","#CECFCE"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","gravel","rock"],
+ tempHigh:"1000",
+ breakInto:"beryl_explosion",
+}
+elements.beryl={
+ color:["#afD677","#D6a579","#D67777","#D678b3"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rust","beryllium","sand","aluminium"],
+ tempHigh:"1300",
+ breakInto:["gravel","rust"],
+ hardness: "60%"
+}
+elements.bixbite={
+ color:["#851315","#A12124","#A13637","#A14C4E"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rust","beryllium","sand","aluminium"],
+ tempHigh:"1300",
+ breakInto:["gravel","rust"],
+}
+elements.benitoite={
+ color:["#8AD4E0","#88ACE0","#7372E0","#505FE0"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|SP",
+ "M2|M1|M2 AND SA"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["titanium","beryllium","sand","oxygen"],
+ tempHigh:"1060",
+ breakInto:["gravel","titanium"],
+}
+elements.kunzite={
+ color:["#f7f7f7","#f7f7f7","#ffffff","#ffDDfb","#ffcbf5"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["gravel","quartz","sand","aluminium"],
+ tempHigh:"1700",
+ breakInto:["gravel","quartz"],
+ hardness: "60%"
+}
+elements.kyanite={
+ color:["#2b3085","#477Dc4","#4f2aE3","#6cb5a1","#ffffff"],
+ behavior: [
+ "SP|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","aluminium"],
+ tempHigh:"1100",
+ breakInto:["metal_scrap","sand"],
+ hardness: "60%"
+}
+elements.apatite={
+ color:["#91CCf0","#8bf0DD","#5fDbb6","#5fDbDb"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "SP|M1|SP"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["calcium","carbon_dioxide"],
+ tempHigh:"1670",
+ breakInto:["calcium","limestone"],
+ hardness: "60%"
+}
+elements.azurite={
+ color:["#3a5Db3","#264fDE","#4265ba"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["copper","carbon_dioxide"],
+ tempHigh:"840",
+ breakInto:["oxidised_copper","limestone"],
+ hardness: "60%"
+}
+elements.aquamarine={
+ color:["#cEfffE","#c1ffff","#Dcfcff"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "SP|M1|SP"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["aluminium","sand","oxygen"],
+ tempHigh:"1650",
+ breakInto:["sand","limestone"],
+ hardness: "60%"
+}
+elements.turquoise={
+ color:["#4bE6bE","#4cDEE5","#55D7E5","#8f4D00"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "SP|M1|SP"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rust","copper","oxygen"],
+ tempHigh:"1700",
+ breakInto:["copper","rock"],
+ hardness: "60%"
+}
+elements.rosequartz={
+ color:["#fDD4ff","#ffD7E9","#ffcEff"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","oxygen"],
+ tempHigh:"1700",
+ breakInto:["sand","rock"],
+ hardness: "60%"
+}
+elements.smokyquartz={
+ color:["#b07f53","#b08b70","#D6b9a0","#472a12"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","oxygen"],
+ tempHigh:"1700",
+ breakInto:["sand","rock"],
+ hardness: "60%"
+}
+elements.milkyquartz={
+ color:["#ffffff","#E0E0E0","#ffffff","#ffffff"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","oxygen"],
+ tempHigh:"1700",
+ breakInto:["sand","rock"],
+ hardness: "60%"
+}
+elements.jasper={
+ color:["#b54345","#5b9155"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rust","gravel"],
+ tempHigh:"1700",
+ breakInto:["gravel","rock"],
+ hardness: "60%"
+}
+elements.leopardjasper={
+ color:["#bDa484","#bDba79","#2b2b1c","#8f6061"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rust","gravel"],
+ tempHigh:"1700",
+ breakInto:["gravel","rock"],
+ hardness: "60%"
+}
+elements.picturejasper={
+ color:["#D6cE9b","#D6D08f"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rust","gravel"],
+ tempHigh:"1700",
+ breakInto:["gravel","rock"],
+ hardness: "60%"
+}
+elements.oceanjasper={
+ color:["#D6D3a7","#99a5D6","#9aD6c5","#99c3D6"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rust","gravel"],
+ tempHigh:"1700",
+ breakInto:["gravel","rock"],
+ hardness: "60%"
+}
+elements.rainforestjasper={
+ color:["#97aD7f","#81aD81","#cfcb9b"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["rust","gravel"],
+ tempHigh:"1700",
+ breakInto:["gravel","rock"],
+ hardness: "60%"
+}
+elements.obsidian={
+ color:["#363636","#000000","#000000"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|XX|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["magma","basalt"],
+ tempHigh:"1200",
+ breakInto:["glass_shard","gravel","rock"],
+ hardness: "60%"
+}
+elements.lapislazuli={
+ color:["#0721ff","#292bE0","#2f5EE0"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|XX|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["calcium","iron","sulfer"],
+ tempHigh:"1100",
+ breakInto:["gravel","rust"],
+ hardness: "60%"
+}
+elements.pearl={
+ color:["#ffE0fb","#E7ffE4","#DfEbff","#DDDDDD","#EEEEEE"],
+ behavior: [
+ "XX|XX|XX",
+ "M2|XX|M2",
+ "SP|M1|SP"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["calcium","limestone"],
+ tempHigh:"1100",
+ breakInto:["gravel","calcium"],
+ hardness: "60%",
+ viscosity:"400",
+}
+elements.chalcedony={
+ color:["#CC9b77","#c7CC79","#76CCa2","#85c5CC","#8382CC"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "SP|M1|SA"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["quartz","rock"],
+ tempHigh:"1100",
+ breakInto:["gravel","sand"],
+ hardness: "60%",
+}
+elements.rawmoissanite={
+ color:["#2b0069","#002169","#003D2c","#000000","#000000"],
+ behavior: [
+ "SP|XX|SP",
+ "XX|XX|XX",
+ "SA AND M2|M1|SP AND m2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["moissanite","dust","ash"],
+ tempHigh:"2600",
+ breakInto:["gravel","sand"],
+ hardness: "90%",
+}
+elements.moissanite={
+ color:["#DfDfff","#faDbff","#DDfaff","#E0ffE0","#fff0Df"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["quartz","charcoal"],
+ tempHigh:"2730",
+ breakInto:["gravel","sand"],
+ hardness: "90%",
+}
+elements.amazonite={
+ color:["#629c7D","#77bf81","#71bf6a"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|SP",
+ "XX|M1|XX"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["quartz","copper"],
+ tempHigh:"1500",
+ breakInto:["copper","sand"],
+ hardness: "30%",
+}
+elements.malachite={
+ color:["#0f7324","#0f7359","#0f7359","#1D735f"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|XX",
+ "M2|M1 AND SP|M2 AND SA"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["carbon_dioxide","oxidised_copper","copper"],
+ tempHigh:"1000",
+ breakInto:["copper","limestone"],
+ hardness: "30%",
+}
+elements.cubiczircona={
+ color:["#FFF3EB","#E8FFE7","#F3E8FF","#ffffff"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["zircon","oxygen"],
+ tempHigh:"1000",
+ breakInto:["gravel","zircon"],
+ hardness: "90%",
+}
+elements.alexandrite={
+ color:["#125416","#2A9146","#734991","#8C48AD","#4C5880","#4C6B80"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["beryllium","oxygen","aluminium"],
+ tempHigh:"1900",
+ breakInto:["metal_scrap","beryllium"],
+ hardness: "70%",
+}
+elements.rhodonite={
+ color:["#ED4747","#ED8282","#EDA3A3","#EDC4C4","#EDD3D3"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["magnesium","oxygen","sand"],
+ tempHigh:"1250",
+ breakInto:["magnesium","gravel"],
+ hardness: "70%",
+}
+elements.cerussite={
+ color:["#FFFBDF","#FFF8D1","#D1CEB8","#8F8D7E"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|SA",
+ "M2 AND SP|M1|M2 AND SP"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["lead","oxygen","carbon_dioxide"],
+ tempHigh:"380",
+ breakInto:["carbon_dioxide","gravel"],
+ hardness: "70%",
+}
+elements.charoite={
+ color:["#9460CC","#9A6CCC","#A07ACC","#A78ACC","#C7AFE6","#D5C8E5"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|XX",
+ "SA|M1|SP"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["potassium","oxygen","calcium","sand"],
+ tempHigh:"1400",
+ breakInto:["potassium","sand","gravel"],
+}
+elements.chromediopside={
+ color:["#11750E","#377538","#499C4B"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|XX",
+ "SA|M1|SP"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["chromium","magnesium","oxygen","calcium","sand"],
+ tempHigh:"1400",
+ breakInto:["chromium","magnesium","gravel"],
+}
+elements.diopside={
+ color:["#D0E6D0","#D9E5D9","#E2E5E2"],
+ behavior: [
+ "XX|XX|XX",
+ "SP|XX|XX",
+ "SA|M1|SP"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["magnesium","oxygen","calcium","sand"],
+ tempHigh:"1400",
+ breakInto:["magnesium","gravel"],
+}
+elements.lepidolite={
+ color:["#BE6CEB","#9A6BEB","#976EB0","#F0E0FF"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "SA AND M2|M1|SA AND M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["potassium","sand","carbon_dioxide","hydrogen"],
+ tempHigh:"1200",
+ breakInto:["carbon_dioxide","aluminium","hydrogen"],
+ hardness: "70%",
+}
+elements.painite={
+ color:["#FF0004","#FF006A","#AD2A2A","#8C420C","#AD1414","#8C1010"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["calcium","zircon","carbon_dioxide","aluminium"],
+ tempHigh:"2090",
+ breakInto:["carbon_dioxide","aluminium","calcium"],
+ hardness: "70%",
+}
+elements.moonstone={
+ color:["#DDDDDD","#D6D6D6","#C8D1D6","#C1D2D6","#BED7F0"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["potassium","sand","sodium","oxygen"],
+ tempHigh:"1090",
+ breakInto:["potassium","aluminium","sodium","oxygen"],
+ hardness: "70%",
+}
+elements.iolite={
+ color:["#7DAFE5","#859CF7","#C4A0F7","#E4D0F7","#EDE6F7"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["magnesium","sand","rust","oxygen"],
+ tempHigh:"1090",
+ breakInto:["metal_scrap","aluminium","rust","oxygen"],
+}
+elements.andalusite={
+ color:["#C28567","#C2A266","#C2C066","#97C264","#9FC283"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M1|M2|M1"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["aluminium","sand","oxygen"],
+ tempHigh:"1090",
+ breakInto:["metal_scrap","aluminium","sand","oxygen"],
+}
+elements.astrophyllite={
+ color:["#C29715","#C2A34F","#E6E6E6","#CCCCCC","#5E5E5E","#383838"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|SP",
+ "M1 AND SA|M2|M1 AND SA"
+ ],
+ category:"gemstones",
+ state:"solid",
+ breakInto:["potassium","iron","magnesium","sand","titanium","oxygen"],
+}
+elements.thunder_egg={
+ color:["#423B34","#42372B","#C7B9AD","#524545","#303030"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","gravel","rock"],
+ tempHigh:"1000",
+ breakInto:"thunder_egg_explosion",
+}
+elements.thunder_egg_explosion={
+ color:["#423B34","#303030"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|EX:4>agate,agate,agate,agate,agate,chalcedony,leopardjasper,picturejasper,jasper,rainforestjasper,oceanjasper|XX",
+ "XX|XX|XX"
+ ],
+ category:"energy",
+}
+elements.beryl_explosion={
+ color:["#CECFCE","#E5E6E5"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|EX:4>beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,beryl,bixbite|XX",
+ "XX|XX|XX"
+ ],
+ category:"energy",
+}
+elements.geode_explosion={
+ color:["#423B34","#303030"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|EX:4>rock,rock,rock,sand,gravel,quartz,quartz,quartz,milkyquartz,rosequartz,smokyquartz|XX",
+ "XX|XX|XX"
+ ],
+ category:"energy",
+}
+elements.geode={
+ color:["#B8B094","#B8A892","#C9C29A","#948F85"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ category:"gemstones",
+ state:"solid",
+ stateHigh:["sand","gravel","rock"],
+ tempHigh:"1000",
+ breakInto:"geode_explosion",
+}
+//paydirt
+elements.normalpaydirt={
+ color:"#6E4c25",
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemology",
+ state:"solid",
+ reactions:{
+ "water":{elem1:["geode","thunder_egg","milkyquartz","smokyquartz","rosequartz","quartz","turquoise","quartz","quartz","citrine","citrine","bloodstone","laminar","dirt","dirt","dirt","dirt","dirt","dirt","mud","mud","mud","mud","mud","mud","mud","dirt","mudstone","tuff"],elem2:"dirty_water"}
+ },
+}
+elements.betterpaydirt={
+ color:["#6E4c25","#c26E15","#9c6422"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemology",
+ state:"solid",
+ reactions:{
+ "water":{elem1:["geode","thunder_egg","moonstone","cerussite","amazonite","jasper","oceanjasper","rainforestjasper","leopardjasper","picturejasper","obsidian","fluorite","rutile","pyrite","apatite","tigersEye","tigersEye","agate","agate","agate","zircon","dirt","mud","mud","mud","mud","dirt","dirt","dirt","dirt","dirt","dirt","mud","mudstone","tuff"],elem2:"dirty_water"}
+ },
+}
+elements.goodpaydirt={
+ color:["#6E4c25","#9c9288","#c2bfbc"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemology",
+ state:"solid",
+ reactions:{
+ "water":{elem1:["iolite","andalusite","chromediopside","charoite","diopside","geode","thunder_egg","lepidolite","rhodonite","cubiczircona","malachite","pearl","lapislazuli","aquamarine","carnelian","azurite","kyanite","commontourmaline","onyx","carnelian","onyx","jadite","nephrite","nephrite","amethyst","amethyst","amethyst","garnet","dirt","dirt","dirt","dirt","dirt","dirt","mud","mud","mud","mud","mud","mud","mud","mud","dirt","mudstone","tuff"],elem2:"dirty_water"}
+ },
+}
+elements.bestpaydirt={
+ color:["#6E4c25","#735f19","#ffca3D"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemology",
+ state:"solid",
+ reactions:{
+ "water":{elem1:["astrophyllite","painite","alexandrite","benitoite","rawmoissanite","opal","blackopal","emerald","fancysapphire","rawtanzanite","raretourmaline","rawberyl","kunzite","ruby","SApphire","mud","dirt","dirt","dirt","dirt","dirt","dirt","dirt","mudstone","tuff"],elem2:"dirty_water"}
+ },
+}
+elements.sieve={
+ color:"#fDffCC",
+ behavior: [
+ "SA|SW:dirty_water,water|SA",
+ "XX|XX|XX",
+ "XX|M1|XX"
+ ],
+ category:"gemology",
+ state:"solid",
+}
+//metals
+elements.beryllium={
+ color:"#5C665C",
+ category:"solids",
+ behavior:[
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ stateHigh:"molten_beryllium",
+ tempHigh:"1300",
+ conduct: 0.47,
+}
+elements.molten_beryllium={
+ color:["#F25000","#ff6845","#ff8752"],
+ behavior:[
+ "XX|cr:fire%10|XX",
+ "M2|XX|M2",
+ "M1|M1|M1"
+ ],
+ stateLow:"beryllium",
+ tempLow:"1299",
+ viscosity:"20",
+ category:"states",
+ conduct: 0.47,
+}
+elements.chromium={
+ color:"#D0E6D0",
+ category:"solids",
+ behavior:[
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2|M1|M2"
+ ],
+ stateHigh:"molten_chromium",
+ tempHigh:"1900",
+ conduct: 0.47,
+}
+elements.molten_chromium={
+ color:["#F25000","#ff6845","#ff8752"],
+ behavior:[
+ "XX|cr:fire%10|XX",
+ "M2|XX|M2",
+ "M1|M1|M1"
+ ],
+ stateLow:"chromium",
+ tempLow:"1899",
+ viscosity:"20",
+ category:"states",
+ conduct: 0.47,
+}
diff --git a/mods/fishin.js b/mods/fishin.js
new file mode 100644
index 00000000..0bd6c544
--- /dev/null
+++ b/mods/fishin.js
@@ -0,0 +1,519 @@
+document.onkeydown = function(ki)/*keyboard_input*/ {
+ //a
+ if (ki.keyCode == 65) {
+ KA = true;
+ //vX ++;
+ }
+ //d
+ if (ki.keyCode == 68) {
+ KD = true;
+ //vX ++;
+ }
+ //w
+ if (ki.keyCode == 81) {
+ KQ = true;
+ //vY ++;
+ }
+ //s
+ if (ki.keyCode == 83) {
+ KS = true;
+ //vY ++;
+ }
+ if (ki.keyCode == 66) {
+ KB = true;
+ }
+}
+document.onkeyup = function(i2)/*keyboard_input*/ {
+ //a
+ if (i2.keyCode == 65) {
+ KA = false;
+ //vX --;
+ }
+ //d
+ if (i2.keyCode == 68) {
+ KD = false;
+ //vX --;
+ }
+ //w
+ if (i2.keyCode == 81) {
+ KQ = false;
+ //vY = 0;
+ }
+ //s
+ if (i2.keyCode == 83) {
+ KS = false;
+ //vY = 0;
+ }
+ if (i2.keyCode == 66) {
+ KB = false;
+
+ }
+}
+var money = 0;
+var stringAmount = 15;
+var deployed = false;
+var reelIn = false;
+var KA = false;
+var KD = false;
+var KQ = false;
+var KS = false;
+var vX = 1;
+var vY = 1;
+elements.fishing_rod = {
+ tick: function(pixel) {
+ /*if (vX === 3) {
+ vX --;
+ }
+ if (vY === 3) {
+ vY --;
+ }*/
+ if (KA === true && deployed === false) {
+ if (isEmpty(pixel.x-vX,pixel.y)) {
+ createPixel("fishing_string",pixel.x-vX,pixel.y)
+ }
+ }
+ if (KD === true && deployed === false) {
+ if (isEmpty(pixel.x+vX,pixel.y)) {
+ createPixel("fishing_string",pixel.x+vX,pixel.y)
+ }
+ }
+ if (KS === true && deployed === false) {
+ if (isEmpty(pixel.x,pixel.y+vY)) {
+ createPixel("fishing_string",pixel.x,pixel.y+vX)
+ }
+ }
+ if (KQ === true && deployed === true) {
+ reelIn = true
+ }
+ if (KB === true) {
+ alert(`You have $${money}.`)
+ KB = false
+ }
+ },
+ color: "#a0522d",
+ renderer: renderPresets.WOODCHAR,
+ tempHigh: 400,
+ stateHigh: ["ember","charcoal","fire","fire","fire"],
+ burn: 5,
+ burnTime: 300,
+ burnInto: ["ember","charcoal","fire"],
+ state: "solid",
+ hardness: 0.15,
+ breakInto: "sawdust",
+ forceSaveColor: true,
+ category: "fishin",
+ movable: false,
+}
+
+elements.fishing_string = {
+ color: ["#F7F7F7","#F1F1F1"],
+ tick: function(pixel) {
+ if (pixel.value === undefined) {
+ pixel.value = stringAmount
+ }
+ if (isEmpty(pixel.x,pixel.y+vY) && pixel.value > 0 && reelIn === false) {
+ createPixel("fishing_string",pixel.x,pixel.y+vX)
+ pixelMap[pixel.x][pixel.y+vX].value = (pixel.value - 1)
+ }
+ else if (!isEmpty(pixel.x,pixel.y+vY,true) && pixel.value > 0 && reelIn === false) {
+ var nextString = pixelMap[pixel.x][pixel.y+vX]
+ if (elements[nextString.element].state === "liquid") {
+ changePixel(nextString,"fishing_string")
+ nextString.value = (pixel.value - 1)
+ }
+ }
+ if (isEmpty(pixel.x,pixel.y+vY) && pixel.value === 0 && reelIn === false) {
+ createPixel("hook",pixel.x,pixel.y+vX)
+ deployed = true
+ }
+ else if (!isEmpty(pixel.x,pixel.y+vY,true) && pixel.value === 0 && reelIn === false) {
+ var nextString = pixelMap[pixel.x][pixel.y+vX]
+ if (elements[nextString.element].state === "liquid") {
+ changePixel(nextString,"hook")
+ deployed = true
+ }
+ }
+ },
+ tempHigh: 412,
+ stateHigh: "fire",
+ burn: 5,
+ burnTime: 350,
+ burnInto: ["smoke","smoke","smoke","smoke","ash"],
+ category: "fishin",
+ state: "solid",
+ breakInto: "dust",
+ movable:false,
+ isString: true
+}
+
+elements.hook = {
+ color: "#71797e",
+ tick: function(pixel) {
+ if (!isEmpty(pixel.x,pixel.y-1,true) && reelIn === true) {
+ if (elements[pixelMap[pixel.x][pixel.y-1].element].isString === true || elements[pixelMap[pixel.x][pixel.y-1].element].id === elements.fish.id) {
+ deletePixel(pixel.x,pixel.y-1)
+ tryMove(pixel, pixel.x, pixel.y-1);
+ }
+ else if (elements[pixelMap[pixel.x][pixel.y-1].element].id === elements.fishing_rod.id) {
+ deletePixel(pixel.x,pixel.y)
+ reelIn = false
+ deployed = false
+ if (pixel.fishCaught) {
+ if (pixel.fishCaught === "fish") {
+ money += 1
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "salmon") {
+ money += 1
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "rainbow_trout") {
+ money += 2
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "bluefin_tuna") {
+ money += 2
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "albacore") {
+ money += 3
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "crab") {
+ money += 3
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ }
+ }
+ }
+ else if (!isEmpty(pixel.x+1,pixel.y,true) && reelIn === true) {
+ if (elements[pixelMap[pixel.x+1][pixel.y].element].id === elements.fishing_rod.id) {
+ deletePixel(pixel.x,pixel.y)
+ reelIn = false
+ deployed = false
+ if (pixel.fishCaught) {
+ if (pixel.fishCaught === "fish") {
+ money += 1
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "salmon") {
+ money += 1
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "rainbow_trout") {
+ money += 2
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "bluefin_tuna") {
+ money += 2
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "albacore") {
+ money += 3
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "crab") {
+ money += 3
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ }
+ }
+ }
+ else if (!isEmpty(pixel.x-1,pixel.y,true) && reelIn === true) {
+ if (elements[pixelMap[pixel.x-1][pixel.y].element].id === elements.fishing_rod.id) {
+ deletePixel(pixel.x,pixel.y)
+ reelIn = false
+ deployed = false
+ if (pixel.fishCaught) {
+ if (pixel.fishCaught === "fish") {
+ money += 1
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "salmon") {
+ money += 1
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "rainbow_trout") {
+ money += 2
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "bluefin_tuna") {
+ money += 2
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "albacore") {
+ money += 3
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ else if (pixel.fishCaught === "crab") {
+ money += 3
+ alert(`Wow! You caught a ${pixel.fishCaught}!`)
+ }
+ }
+ }
+ }
+ },
+ reactions: {
+ "fish": { elem2:null, attr1:{"fishCaught":"fish"}, chance:0.4, func: function(pixel){if (reelIn === false) { reelIn = true }}},
+ "salmon": { elem2:null, attr1:{"fishCaught":"salmon"}, chance:0.4, func: function(pixel){if (reelIn === false) { reelIn = true }}},
+ "bluefin_tuna": { elem2:null, attr1:{"fishCaught":"tuna"}, chance:0.4, func: function(pixel){if (reelIn === false) { reelIn = true }}},
+ "albacore": { elem2:null, attr1:{"fishCaught":"tuna"}, chance:0.4, func: function(pixel){if (reelIn === false) { reelIn = true }}},
+ "crab": { elem2:null, attr1:{"fishCaught":"crab"}, chance:0.4, func: function(pixel){if (reelIn === false) { reelIn = true }}},
+ },
+ tempHigh: 1455.5,
+ stateHigh: "molten_steel",
+ category: "fishin",
+ density: 7850,
+ conduct: 0.42,
+ hardness: 0.8,
+ movable: false,
+}
+
+elements.salmon = {
+ color: ["#C0C3CF", "#B7BAC3", "#ADB0B8"],
+ behavior: [
+ "XX|M2%5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14",
+ "XX|FX%0.5|BO",
+ "M2|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%8",
+ ],
+ category: "fishin",
+ state: "solid",
+ conduct: 0.2,
+ eggColor: ["#e8961c","#faa82d"],
+ breakInto: "blood",
+ burn:20,
+ burnTime:200,
+ temp: 20,
+ tempHigh: 120,
+ stateHigh: "cooked_meat",
+ tempLow: -20,
+ stateLow: "frozen_fish",
+ reactions: {
+ "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "kelp": { elem2:"water", chance:0.025, func:behaviors.FEEDPIXEL },
+ "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL },
+ "fly": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
+ "firefly": { elem2:null, chance:0.6, func:behaviors.FEEDPIXEL },
+ "worm": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "tadpole": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "oxygen": { elem2:"carbon_dioxide", chance:0.5 },
+ "dead_bug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "broth": { elem2:"water", chance:0.2, func:behaviors.FEEDPIXEL },
+ "slug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "herb": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lettuce": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "dead_plant": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lichen": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ "yeast": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yogurt": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "tea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "rotten_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cooked_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yolk": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cell": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "crumb": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ },
+ desc: "Salmo salar"
+}
+
+elements.rainbow_trout = {
+ color: ["#D5A2B2", "#DDBBAB"],
+ behavior: [
+ "XX|M2%5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14",
+ "XX|FX%0.5|BO",
+ "M2|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%7",
+ ],
+ category: "fishin",
+ state: "solid",
+ conduct: 0.2,
+ eggColor: ["#e8961c","#faa82d"],
+ breakInto: "blood",
+ burn:20,
+ burnTime:200,
+ temp: 20,
+ tempHigh: 120,
+ stateHigh: "cooked_meat",
+ tempLow: -20,
+ stateLow: "frozen_fish",
+ reactions: {
+ "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "kelp": { elem2:"water", chance:0.025, func:behaviors.FEEDPIXEL },
+ "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL },
+ "fly": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
+ "firefly": { elem2:null, chance:0.6, func:behaviors.FEEDPIXEL },
+ "worm": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "tadpole": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "oxygen": { elem2:"carbon_dioxide", chance:0.5 },
+ "dead_bug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "broth": { elem2:"water", chance:0.2, func:behaviors.FEEDPIXEL },
+ "slug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "herb": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lettuce": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "dead_plant": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lichen": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ "yeast": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yogurt": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "tea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "rotten_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cooked_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yolk": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cell": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "crumb": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ },
+ desc: "Salmo salar"
+}
+
+elements.bluefin_tuna = {
+ color: ["#3D74BA", "#4A6FB1", "#4A6FB1", "#dadbdc"],
+ behavior: [
+ "XX|M2%5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14",
+ "XX|FX%0.5|BO",
+ "M2|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%8",
+ ],
+ category: "fishin",
+ state: "solid",
+ conduct: 0.2,
+ eggColor: ["#211316","#2C1A1D","#503734"],
+ breakInto: "blood",
+ burn:20,
+ burnTime:200,
+ temp: 20,
+ tempHigh: 120,
+ stateHigh: "cooked_meat",
+ tempLow: -20,
+ stateLow: "frozen_fish",
+ reactions: {
+ "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "kelp": { elem2:"water", chance:0.025, func:behaviors.FEEDPIXEL },
+ "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL },
+ "fly": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
+ "firefly": { elem2:null, chance:0.6, func:behaviors.FEEDPIXEL },
+ "worm": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "tadpole": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "oxygen": { elem2:"carbon_dioxide", chance:0.5 },
+ "dead_bug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "broth": { elem2:"water", chance:0.2, func:behaviors.FEEDPIXEL },
+ "slug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "herb": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lettuce": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "dead_plant": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lichen": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ "yeast": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yogurt": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "tea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "rotten_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cooked_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yolk": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cell": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "crumb": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ },
+ desc: "Thunnus thynnus"
+}
+
+elements.albacore = {
+ color: ["#dadbdc", "#b5b6b8", "#6b6d71"],
+ behavior: [
+ "XX|M2%5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14",
+ "XX|FX%0.5|BO",
+ "M2|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%8",
+ ],
+ category: "fishin",
+ state: "solid",
+ conduct: 0.2,
+ eggColor: ["#211316","#2C1A1D","#503734"],
+ breakInto: "blood",
+ burn:20,
+ burnTime:200,
+ temp: 20,
+ tempHigh: 120,
+ stateHigh: "cooked_meat",
+ tempLow: -20,
+ stateLow: "frozen_fish",
+ reactions: {
+ "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "kelp": { elem2:"water", chance:0.025, func:behaviors.FEEDPIXEL },
+ "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL },
+ "fly": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
+ "firefly": { elem2:null, chance:0.6, func:behaviors.FEEDPIXEL },
+ "worm": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "tadpole": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "oxygen": { elem2:"carbon_dioxide", chance:0.5 },
+ "dead_bug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "broth": { elem2:"water", chance:0.2, func:behaviors.FEEDPIXEL },
+ "slug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "herb": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lettuce": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "dead_plant": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lichen": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ "yeast": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yogurt": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "tea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "rotten_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cooked_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yolk": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cell": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "crumb": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ },
+ desc: "Thunnus alalunga"
+}
+
+elements.crab = {
+ color: "#bc5a4c",
+ behavior: [
+ "XX|XX|SW:sand,water,salt_water,dirty_water,primordial_soup,blood,infection,color_sand%1 AND M2%5",
+ "XX|XX|SW:sand,water,salt_water,dirty_water,primordial_soup,blood,infection,color_sand%3 AND M2%10 AND BO",
+ "XX|M1|SW:sand,water,salt_water,dirty_water,primordial_soup,blood,infection,color_sand%4",
+ ],
+ reactions: {
+ "algae": { elem2:null, chance:0.025, func:behaviors.FEEDPIXEL },
+ "kelp": { elem2:"water", chance:0.025, func:behaviors.FEEDPIXEL },
+ "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL },
+ "fly": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
+ "firefly": { elem2:null, chance:0.6, func:behaviors.FEEDPIXEL },
+ "worm": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "tadpole": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "spider": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
+ "oxygen": { elem2:"carbon_dioxide", chance:0.5 },
+ "dead_bug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "broth": { elem2:"water", chance:0.2, func:behaviors.FEEDPIXEL },
+ "slug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "herb": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lettuce": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "dead_plant": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "lichen": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ "yeast": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "yogurt": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "tea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
+ "yolk": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "cell": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "crumb": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
+ "alcohol": { elem1:"meat", chance:0.001 },
+ "water": { elem2:"bubble", attr2:{"clone":"water"}, chance:0.001, oneway:true },
+ "salt_water": { elem2:"bubble", attr2:{"clone":"salt_water"}, chance:0.001, oneway:true },
+ "pool_water": { elem1:"meat", chance:0.001 },
+ "chlorine": { elem1:"meat", chance:0.1 },
+ "vinegar": { elem1:"meat", chance:0.001 },
+ },
+ foodNeed: 20,
+ temp: 20,
+ tempHigh: 120,
+ stateHigh: "meat",
+ tempLow: -20,
+ stateLow: ["frozen_meat","frozen_meat","frozen_meat","frozen_fish"],
+ category:"fishin",
+ breakInto: "blood",
+ burn:20,
+ burnTime:200,
+ state: "solid",
+ density: 963.7,
+ conduct: 0.2,
+ eggColor: "#d4b98f",
+ desc: "Carcinus maenas"
+}
+
+elements.fish.desc = "Gadus harenae"
+elements.fish.category = "fishin"
\ No newline at end of file
diff --git a/mods/incinerators.js b/mods/incinerators.js
new file mode 100644
index 00000000..34e2f5de
--- /dev/null
+++ b/mods/incinerators.js
@@ -0,0 +1,29 @@
+elements.incinerator = {
+ color: "#e600ff",
+ desc: "A machine that works like the incinerate tool.",
+ behavior: [
+ "XX|HT:10000|XX",
+ "HT:10000|XX|HT:10000",
+ "XX|HT:10000|XX",
+ ],
+ category: "machines",
+ state: "solid",
+ insulate:true,
+};
+
+elements.e_incinerator = {
+ color: "#9802a8",
+ desc: "It works like the incinerator but it needs power to work.",
+ behavior: behaviors.WALL,
+ hardness: 0.5,
+ conduct: 1,
+ behaviorOn: [
+ "XX|HT:10000|XX",
+ "HT:10000|XX|HT:10000",
+ "XX|HT:10000|XX",
+ ],
+ name: "E-Incinerator",
+ category: "machines",
+ state: "solid",
+ insulate:true,
+};