about summary refs log tree commit diff stats
path: root/html/broughlike
diff options
context:
space:
mode:
Diffstat (limited to 'html/broughlike')
-rw-r--r--html/broughlike/index.html13
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();
ik K. Agaram <vc@akkartik.com> 2015-01-25 21:24:13 -0800 committer Kartik K. Agaram <vc@akkartik.com> 2015-01-25 21:24:13 -0800 624 - no, that's all wrong, scratch 623' href='/akkartik/mu/commit/stdin.mu?h=main&id=5b698455793a6bee2bacab1a646f73c9c49a75ee'>5b698455 ^
337a099d ^
7d2c2d55 ^




337a099d ^

337a099d ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27