diff --git a/mods/igniter.js b/mods/igniter.js index 1cc04e76..aff8cdd3 100644 --- a/mods/igniter.js +++ b/mods/igniter.js @@ -17,3 +17,37 @@ elements.extinguisher = { category: "tools", excludeRandom: true, }; + +elements.cursed_shock = { + color: ["#ffff00", "#00ff00", "#ffff00", "#00ff00", "#ffff00", "#00ff00", "#ffff00", "#00ff00"], + tool: function(pixel) { + var con = elements[pixel.element].conduct; + if (con == undefined) {con = 0} + if (Math.random() < con || con == 0) { // If random number is less than conductivity, or anyway + if (!pixel.charge && !pixel.chargeCD) { + pixel.charge = 1; + if (elements[pixel.element].colorOn) { + pixel.color = pixelColorPick(pixel); + } + } + } + if(Math.random() > con) { + if (elements[pixel.element].insulate != true) { // Otherwise heat the pixel (Resistance simulation) + pixel.temp += 0.25; + pixelTempCheck(pixel); + } + } + }, + category: "tools", + excludeRandom: true, +}; + +elements.extinguisher = { + color: "#bad1e3", + tool: function(pixel) { + if(pixel.burnStart) { delete pixel.burnStart } + pixel.burning = false; + }, + category: "tools", + excludeRandom: true, +};