From 26e72fe1644946927248a6a66ee8256000f9ff2a Mon Sep 17 00:00:00 2001 From: Lily-129 <68935009+Lily-129@users.noreply.github.com> Date: Fri, 11 Feb 2022 11:22:55 -0500 Subject: [PATCH] new troll explode troll --- mods/troll.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mods/troll.js b/mods/troll.js index 30caf023..902a9c26 100644 --- a/mods/troll.js +++ b/mods/troll.js @@ -56,4 +56,23 @@ elements.troll3 = { insulate: true, state: "solid", excludeRandom: true, +}, + +elements.troll4 = { + color: "#eeeeee", + tick: function(pixel) { + for (var i = 1; i < width; i++) { + for (var j = 1; j < height; j++) { + var eeaa = (Math.floor(Math.random()*5))-2 + if(Math.random() < 0.00007) { explodeAt(i,j,9+eeaa) } + if(j == height) { j == 1 } + } + if(i == height) { i == 1 } + } + }, + category: "machines", + insulate: true, + hardness: 1.0, + state: "solid", + excludeRandom: true, }