Fix false start detection to actually update the file. Include detonations via silvers.

main
sigonasr2 3 years ago
parent 32054492a2
commit 728debca63
  1. 179
      src/backend/data.json
  2. 37
      src/backend/data.json.bak
  3. 12
      src/backend/logreader.js
  4. 15
      src/backend/logreader.js.bak

@ -1,94 +1,94 @@
{ {
"pomander": [ "pomander": [
[ [
0, 3,
0, 12,
95 109
], ],
[ [
0, 3,
0, 17,
132 151
], ],
[ [
0, 3,
0, 26,
191 220
], ],
[ [
0, 3,
0, 33,
176 210
], ],
[ [
0, 3,
0, 14,
61 76
], ],
[ [
0, 3,
0, 10,
75 85
], ],
[ [
0, 3,
0, 7,
84 91
], ],
[ [
0, 3,
0, 9,
84 93
], ],
[ [
0, 3,
0, 17,
121 140
], ],
[ [
0, 3,
0, 13,
116 130
], ],
[ [
0, 2,
0, 13,
90 103
], ],
[ [
0, 3,
0, 13,
95 108
], ],
[ [
0, 2,
0, 15,
110 127
], ],
[ [
0, 3,
0, 20,
117 137
], ],
[ [
0, 1,
0, 1,
34 35
], ],
[ [
0, 1,
0, 1,
45 46
] ]
], ],
"accursed_hoard": [ "accursed_hoard": [
[ [
0, 8,
19 27
], ],
[ [
0, 4,
35 39
], ],
[ [
0, 0,
@ -100,63 +100,63 @@
] ]
], ],
"mimics": [ "mimics": [
0, 221,
0 10
], ],
"traps": [ "traps": [
[ [
0, 5,
26 31
], ],
[ [
0, 3,
19 22
], ],
[ [
0, 8,
43 51
], ],
[ [
0, 8,
37 46
], ],
[ [
0, 3,
20 23
] ]
], ],
"floor_effects": [ "floor_effects": [
[ [
0, 5,
24 30
], ],
[ [
0, 1,
30 32
], ],
[ [
0, 1,
21 22
], ],
[ [
0, 4,
26 30
], ],
[ [
0, 2,
14 16
], ],
[ [
0, 1,
9 10
], ],
[ [
0, 2,
23 26
], ],
[ [
0, 2,
16 18
], ],
[ [
0, 0,
@ -167,26 +167,27 @@
12 12
], ],
[ [
0, 2,
17 19
] ]
], ],
"death_count": [ "death_count": [
1, 1,
10 10
], ],
"floor": 0, "floor": 70,
"accursed_hoard_detected": false, "accursed_hoard_detected": false,
"previous_pomander": "", "previous_pomander": "",
"floor_storage": {}, "floor_storage": {},
"floor_buff_storage": {}, "floor_buff_storage": {},
"kills": 0, "kills": 781,
"rare_kills": 0, "rare_kills": 0,
"mimic": 0, "mimic": 18,
"mandragora": 0, "mandragora": 2,
"currentLevel": 1, "currentLevel": 60,
"startLevel": 1, "startLevel": 1,
"points": 0, "points": 893806,
"fully_explored": true, "fully_explored": true,
"time_bonus": true "time_bonus": true,
"started": true
} }

@ -3,27 +3,27 @@
[ [
0, 0,
0, 0,
95 97
], ],
[ [
0, 0,
0, 0,
132 134
], ],
[ [
0
0, 0,
0, 194
191
], ],
[ [
0, 0,
0, 0,
176 177
], ],
[ [
0, 0,
0, 0,
61 62
], ],
[ [
0, 0,
@ -43,12 +43,12 @@
[ [
0, 0,
0, 0,
121 123
], ],
[ [
0, 0,
0, 0,
116 117
], ],
[ [
0, 0,
@ -63,7 +63,7 @@
[ [
0, 0,
0, 0,
110 112
], ],
[ [
0, 0,
@ -117,8 +117,8 @@
43 43
], ],
[ [
1, 0,
37 38
], ],
[ [
0, 0,
@ -127,12 +127,12 @@
], ],
"floor_effects": [ "floor_effects": [
[ [
1, 0,
24 25
], ],
[ [
1, 0,
30 31
], ],
[ [
0, 0,
@ -151,8 +151,8 @@
9 9
], ],
[ [
1, 0,
23 24
], ],
[ [
0, 0,
@ -188,5 +188,6 @@
"startLevel": 1, "startLevel": 1,
"points": 0, "points": 0,
"fully_explored": true, "fully_explored": true,
"time_bonus": true "time_bonus": true,
"started": false
} }

@ -456,12 +456,19 @@ function ParseString(str) {
} else } else
if (split[4].includes("This floor is being marked as incomplete.")) { if (split[4].includes("This floor is being marked as incomplete.")) {
fully_explored=false fully_explored=false
update_file=true;
} else } else
if (split[4].includes("30 minutes remaining")) { if (split[4].includes("30 minutes remaining")) {
time_bonus=false; time_bonus=false;
update_file=true;
} else } else
if (split[4].includes("You obtain ")&&split[4].includes(" gil.")) { if (split[4].includes("You obtain ")&&split[4].includes(" gil.")) {
started=false; started=false;
update_file=true;
} else
if (split[4].includes("The detonator is triggered! The treasure coffer is no more...")) {
points-=101
update_file=true;
} }
} else } else
if (split.length==9 && split[0]==="33"&&split[3]==="10000007"&&split[6]==="FF"&&started) { if (split.length==9 && split[0]==="33"&&split[3]==="10000007"&&split[6]==="FF"&&started) {
@ -470,6 +477,7 @@ function ParseString(str) {
} else } else
if (split.length==22&&started) { if (split.length==22&&started) {
if (split[0]==="04") { if (split[0]==="04") {
const blacklist=["trap","ruby carbuncle","topaz carbuncle","emerald carbuncle"]
const RareMonsterNames=[ const RareMonsterNames=[
"bloated conjurer", "bloated archer", "bloated pugilist", "sword-swinging adventurer", "staff-spinning adventurer", "spear-shaking adventurer", "bloated conjurer", "bloated archer", "bloated pugilist", "sword-swinging adventurer", "staff-spinning adventurer", "spear-shaking adventurer",
"roughspun ruffian", "frenzied freebooter", "ishgardian pikeman", "duskwight lancer", "mortifying magnate", "insentient inquisitor", "moldering merchant", "roughspun ruffian", "frenzied freebooter", "ishgardian pikeman", "duskwight lancer", "mortifying magnate", "insentient inquisitor", "moldering merchant",
@ -479,6 +487,7 @@ function ParseString(str) {
//A kill is recorded. //A kill is recorded.
/*04|2022-03-26T08:59:44.8220000-05:00|4000C5B3|Palace Ziz|00|3|0000|00||4983|5775|0|125|0|10000|||201.28|-298.63|0.25|-1.78|9b83e6b7aea20b6b*/ /*04|2022-03-26T08:59:44.8220000-05:00|4000C5B3|Palace Ziz|00|3|0000|00||4983|5775|0|125|0|10000|||201.28|-298.63|0.25|-1.78|9b83e6b7aea20b6b*/
var name = split[3] var name = split[3]
if (!blacklist.includes(name.toLowerCase())&&split[11]==="0") {
if (RareMonsterNames.includes(name.toLowerCase())) { if (RareMonsterNames.includes(name.toLowerCase())) {
rare_kills++ rare_kills++
points+=2020 points+=2020
@ -496,7 +505,10 @@ function ParseString(str) {
points+=100+Math.floor(floor/2)+(floor>=101?101:0) points+=100+Math.floor(floor/2)+(floor>=101?101:0)
kills++; kills++;
} }
console.log("Death for "+name+". ("+split[11]+"/"+split[12]+" HP)")
update_file=true; update_file=true;
}
} }
} }
if (update_file) { if (update_file) {

@ -132,6 +132,7 @@ if (fs.existsSync('./data.json')) {
points=master_obj.points??0 points=master_obj.points??0
fully_explored=master_obj.fully_explored??true fully_explored=master_obj.fully_explored??true
time_bonus=master_obj.time_bonus??true time_bonus=master_obj.time_bonus??true
started=master_obj.started??false
} }
@ -167,6 +168,7 @@ function CreateMasterObj() {
points:Math.max(points,0), points:Math.max(points,0),
fully_explored:fully_explored, fully_explored:fully_explored,
time_bonus:time_bonus, time_bonus:time_bonus,
started:started,
} }
} }
@ -457,14 +459,21 @@ function ParseString(str) {
} else } else
if (split[4].includes("30 minutes remaining")) { if (split[4].includes("30 minutes remaining")) {
time_bonus=false; time_bonus=false;
} else
if (split[4].includes("You obtain ")&&split[4].includes(" gil.")) {
started=false;
} else
if (split[4].includes("The detonator is triggered! The treasure coffer is no more...")) {
points-=101
} }
} else } else
if (split.length==9 && split[0]==="33"&&split[3]==="10000007"&&split[6]==="FF") { if (split.length==9 && split[0]==="33"&&split[3]==="10000007"&&split[6]==="FF"&&started) {
points+=101 points+=101
//console.log("Treasure coffer: "+points) //console.log("Treasure coffer: "+points)
} else } else
if (split.length==22&&started) { if (split.length==22&&started) {
if (split[0]==="04") { if (split[0]==="04") {
const blacklist=["trap","ruby carbuncle","topaz carbuncle","emerald carbuncle"]
const RareMonsterNames=[ const RareMonsterNames=[
"bloated conjurer", "bloated archer", "bloated pugilist", "sword-swinging adventurer", "staff-spinning adventurer", "spear-shaking adventurer", "bloated conjurer", "bloated archer", "bloated pugilist", "sword-swinging adventurer", "staff-spinning adventurer", "spear-shaking adventurer",
"roughspun ruffian", "frenzied freebooter", "ishgardian pikeman", "duskwight lancer", "mortifying magnate", "insentient inquisitor", "moldering merchant", "roughspun ruffian", "frenzied freebooter", "ishgardian pikeman", "duskwight lancer", "mortifying magnate", "insentient inquisitor", "moldering merchant",
@ -474,6 +483,7 @@ function ParseString(str) {
//A kill is recorded. //A kill is recorded.
/*04|2022-03-26T08:59:44.8220000-05:00|4000C5B3|Palace Ziz|00|3|0000|00||4983|5775|0|125|0|10000|||201.28|-298.63|0.25|-1.78|9b83e6b7aea20b6b*/ /*04|2022-03-26T08:59:44.8220000-05:00|4000C5B3|Palace Ziz|00|3|0000|00||4983|5775|0|125|0|10000|||201.28|-298.63|0.25|-1.78|9b83e6b7aea20b6b*/
var name = split[3] var name = split[3]
if (!blacklist.includes(name.toLowerCase())&&split[11]==="0") {
if (RareMonsterNames.includes(name.toLowerCase())) { if (RareMonsterNames.includes(name.toLowerCase())) {
rare_kills++ rare_kills++
points+=2020 points+=2020
@ -491,7 +501,10 @@ function ParseString(str) {
points+=100+Math.floor(floor/2)+(floor>=101?101:0) points+=100+Math.floor(floor/2)+(floor>=101?101:0)
kills++; kills++;
} }
console.log("Death for "+name+". ("+split[11]+"/"+split[12]+" HP)")
update_file=true; update_file=true;
}
} }
} }
if (update_file) { if (update_file) {

Loading…
Cancel
Save