Skip to content

Commit 7c5315c

Browse files
authored
Merge pull request #61 from Disilon/better-statistics
Better statistics
2 parents ad727fc + 01d6667 commit 7c5315c

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

KTL/driver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function secondPassed() {
8484

8585
data.currentGameState.secondsPassed++;
8686
data.currentGameState.secondsThisLS++;
87-
87+
if (data.currentGameState.secondsThisGR !== undefined) data.currentGameState.secondsThisGR++;
8888
}
8989

9090
function realSecondPassed() {

KTL/ktl.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ function genesisReset(forceReset) {
144144
data.ancientCoin = 0;
145145
data.ancientWhisper = 0;
146146
data.currentGameState.secondsThisLS = 0;
147+
data.currentGameState.secondsThisGR = 0;
147148
data.highestLegacy = 0;
148149

149150
clearUpgradesForGenesis()
@@ -485,7 +486,7 @@ function logKTL() {
485486
},
486487
stage2: null
487488
});
488-
if (data.resetLogs.length > 10) data.resetLogs.shift();
489+
if (data.resetLogs.length > 100) data.resetLogs.shift();
489490
data.ancientCoinGained = 0;
490491
data.ancientWhisperGained = 0;
491492
refreshResetLog();
@@ -545,7 +546,7 @@ function renderResetLog() {
545546
}
546547
return `
547548
<div style="overflow-x:auto">
548-
<div style="font-size:20px; font-weight:bold; margin:0 0 6px 0;">Recent Run Statistics (Last 10)</div>
549+
<div style="font-size:20px; font-weight:bold; margin:0 0 6px 0;">Recent Run Statistics (Last 100)</div>
549550
<table style="width:100%;border-collapse:collapse;font-size:16px;white-space:nowrap">
550551
<thead>
551552
<tr>

KTL/menu.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ function createDataMenu() {
187187
<div id="secondsPassedContainer">
188188
Time Passed, total: <span id="secondsPassed"></span>
189189
</div>
190+
<div id="secondsThisGRContainer">
191+
Time Passed, this Genesis Reset: <span id="secondsThisGR"></span>
192+
</div>
190193
<div id="secondsThisLSContainer">
191194
Time Passed, this Legacy Severance: <span id="secondsThisLS"></span>
192195
</div>

KTL/views/viewCreate.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,6 +1336,8 @@ function setAllCaches() {
13361336
queueCache("highestLegacy");
13371337
queueCache("secondsPassedContainer");
13381338
queueCache("secondsPassed");
1339+
queueCache("secondsThisGRContainer");
1340+
queueCache("secondsThisGR");
13391341
queueCache("secondsThisLSContainer");
13401342
queueCache("secondsThisLS");
13411343
queueCache("genesisPoints");

KTL/views/viewUpdating.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ let views = {
4040
views.updateVal(`highestLegacyContainer`, data.highestLegacy > 0 ? "" : "none", "style.display");
4141
views.updateVal(`highestLegacy`, data.highestLegacy, "textContent", 2);
4242
views.updateVal(`secondsPassed`, data.currentGameState.secondsPassed, "textContent", "time");
43-
views.updateVal(`secondsThisLSContainer`, data.lichKills > 0 ? "" : "none", "style.display");
43+
views.updateVal(`secondsThisGRContainer`, data.currentGameState.secondsThisGR > 0 ? "" : "none", "style.display");
44+
views.updateVal(`secondsThisGR`, data.currentGameState.secondsThisGR, "textContent", "time");
45+
views.updateVal(`secondsThisLSContainer`, (data.lichKills > 0 || data.genesisResets > 0) ? "" : "none", "style.display");
4446
views.updateVal(`secondsThisLS`, data.currentGameState.secondsThisLS, "textContent", "time");
4547
views.updateVal(`legacyMult`, data.legacyMultKTL, "innerText", 2);
4648
views.updateVal(`ancientCoinMult`, data.ancientCoinMultKTL, "innerText", 2);

0 commit comments

Comments
 (0)