From 0703e61e446dced120d5bfc64d69ac281c167110 Mon Sep 17 00:00:00 2001 From: Josh Curtiss Date: Mon, 29 Jul 2024 02:42:07 -0500 Subject: [PATCH] feat: Add cheat: "KILL" kills all enemies --- src/scenes/GameScene.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scenes/GameScene.ts b/src/scenes/GameScene.ts index 54eb04a..531972f 100644 --- a/src/scenes/GameScene.ts +++ b/src/scenes/GameScene.ts @@ -355,6 +355,9 @@ export default function(options: Partial) { } else if (keylog.slice(-4)==='gold') { player.score += randi(75, 150) * 100; debugLog(`Score: ${player.score}`); + } else if (keylog.slice(-4)==='kill') { + enemies.forEach(enemy=>enemy.squash()); + debugLog(`Everybody died...`); } else if (keylog.slice(-4)==='gone') { while (enemies.length) enemies.pop()?.destroy(); debugLog(`Everybody's gone now...`);