dissolves everything and stores it (it does dissolve it without alteration, but good luck doing anything with that)
This commit is contained in:
O-01-67 2022-10-04 14:00:14 -04:00 committed by GitHub
parent 7b264f57fa
commit 69c1200d90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 0 deletions

31
mods/alkahest.js Normal file
View File

@ -0,0 +1,31 @@
elements.alkahest = {
color: "#33eeee",
behavior: behaviors.LIQUID_OLD,
state: "solid",
category: "special",
density: 999,
hardness: 1,
tick: function(pixel) {
for(i = 0; i < adjacentCoords.length; i++) {
if(Math.random() < 0.1) {
var pX = pixel.x
var pY = pixel.y
var oX = adjacentCoords[i][0];
var oY = adjacentCoords[i][1];
var checkPosX = pX+oX;
var checkPosY = pY+oY;
if(!isEmpty(checkPosX,checkPosY,true)) {
var newPixel = pixelMap[checkPosX][checkPosY];
var newElement = newPixel.element;
if(![pixel.element,"wall"].includes(newElement)) { //unless someone's willing to implement dragon parts
if(typeof(pixel[newElement]) === "undefined") {
pixel[newElement] = 0;
};
pixel[newElement]++;
deletePixel(checkPosX,checkPosY);
};
};
};
};
},
};