diff options
author | elioat <{ID}+{username}@users.noreply.github.com> | 2024-10-29 21:34:11 -0400 |
---|---|---|
committer | elioat <{ID}+{username}@users.noreply.github.com> | 2024-10-29 21:34:11 -0400 |
commit | bc572f84356a417f4714d723eeb1a498aa1d340f (patch) | |
tree | 46074c4f651238490f0cf88680ddac8678158320 /html | |
parent | 8cb8f46d93796e4bd3b3c3ca3eda037d2c484377 (diff) | |
download | tour-bc572f84356a417f4714d723eeb1a498aa1d340f.tar.gz |
*
Diffstat (limited to 'html')
-rw-r--r-- | html/broughlike/index.html | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/html/broughlike/index.html b/html/broughlike/index.html index 9b6a088..b318def 100644 --- a/html/broughlike/index.html +++ b/html/broughlike/index.html @@ -118,7 +118,9 @@ totalDamageTaken: 0, cellsTraveled: 0, killCount: 0, - itemsCollected: 0 + itemsCollected: 0, + lineSegments: 0, + inventory: [] }; const exit = { x: Math.floor(Math.random() * GRID_SIZE), y: Math.floor(Math.random() * GRID_SIZE) }; @@ -724,7 +726,12 @@ if (enemy.health <= 0) { player.killCount++; - enemies = enemies.filter(e => e !== enemy); + enemies = enemies.filter(e => e !== enemy); + if (enemy.isBoss) { + player.lineSegments += 2; + } else { + player.lineSegments++; + } } if (player.health <= 0) { @@ -753,6 +760,8 @@ player.itemsCollected = 0; player.x = 0; player.y = 0; + player.lineSegments = 0; + player.inventory = []; combatDots = {}; generateExit(); generateEnemies(); |