Skip to content

Commit

Permalink
feat: Add cheat: "KILL" kills all enemies
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacurtiss committed Jul 29, 2024
1 parent b0e0328 commit 0703e61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scenes/GameScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ export default function(options: Partial<GameSceneOpt>) {
} 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...`);
Expand Down

0 comments on commit 0703e61

Please sign in to comment.