about summary refs log tree commit diff stats
path: root/html
diff options
context:
space:
mode:
Diffstat (limited to 'html')
-rw-r--r--html/broughlike/index.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/html/broughlike/index.html b/html/broughlike/index.html
index 2d09c92..e643527 100644
--- a/html/broughlike/index.html
+++ b/html/broughlike/index.html
@@ -65,7 +65,8 @@
             totalDamageDone: 0,
             totalDamageTaken: 0,
             cellsTraveled: 0,
-            killCount: 0
+            killCount: 0,
+            itemsCollected: 0
         };
 
         const exit = { x: Math.floor(Math.random() * GRID_SIZE), y: Math.floor(Math.random() * GRID_SIZE) };
@@ -299,6 +300,7 @@
         function handleItemCollection() {
             const collectedItem = items.find(item => item.x === player.x && item.y === player.y);
             if (collectedItem) {
+                player.itemsCollected++;
                 if (collectedItem.type === 'diamond') {
                     player.damage += 3;
                     console.log("Collected diamond! +3 damage on this level.");
@@ -406,7 +408,7 @@
             }
 
             if (player.health <= 0) {
-                alert(`Dead\n\nScore: ${player.score}\nDistance Traveled: ${player.cellsTraveled}\nTotal Damage Dealt: ${player.totalDamageDone}\nTotal Damage Received: ${player.totalDamageTaken}\nCircles Vanquished: ${player.killCount}`);
+                alert(`Dead\n\nScore: ${player.score}\nDistance Traveled: ${player.cellsTraveled}\nTotal Damage Dealt: ${player.totalDamageDone}\nTotal Damage Received: ${player.totalDamageTaken}\nCircles Vanquished: ${player.killCount}\nItems Collected: ${player.itemsCollected}`);
                 resetGame();
             }
         }
@@ -420,6 +422,7 @@
             player.cellsTraveled = 0;
             player.score = 0;
             player.killCount = 0;
+            player.itemsCollected = 0;
             player.x = 0;
             player.y = 0;
             combatDots = {};
@@ -441,6 +444,7 @@
                 console.log("Total Damage Dealt: " + player.totalDamageDone);
                 console.log("Total Damage Received: " + player.totalDamageTaken);
                 console.log("Circles Vanquished: " + player.killCount);
+                console.log("Items Collected: " + player.itemsCollected);
                 console.groupEnd();
                 combatDots = {};
                 generateExit();
or Thomas E. Dickey <dickey@invisible-island.net> 2018-03-13 09:14:59 +0000 committer Thomas E. Dickey <dickey@invisible-island.net> 2018-03-13 09:14:59 +0000 snapshot of project "lynx", label v2-8-9dev_16t' href='/ingrix/lynx-snapshots/commit/PACKAGE/lynx.spec?id=d9693d8087ccf1edac2cb408699d43162fecabb5'>d9693d80 ^
bc0fa578 ^

28ff055f ^

bc0fa578 ^


bc0fa578 ^



d9693d80 ^
bc0fa578 ^



44b428bb ^
d9693d80 ^
bc0fa578 ^








































38b6827e ^
bc0fa578 ^






















d9693d80 ^
bc0fa578 ^


d9693d80 ^

bc0fa578 ^


d9693d80 ^


bc0fa578 ^

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129