Prevent false starts for kill detection

main
sigonasr2 3 years ago
parent ba193096c7
commit 32054492a2
  1. BIN
      FFXIVLogs - Shortcut.lnk
  2. 5
      run.sh.bak
  3. 4
      src/App.css
  4. 6
      src/App.css.bak
  5. 2
      src/App.js
  6. 4
      src/App.js.bak
  7. 183
      src/backend/data - Copy.json
  8. 113
      src/backend/data.json
  9. 134
      src/backend/data.json.bak
  10. 16
      src/backend/logreader.js
  11. 10
      src/backend/logreader.js.bak

Binary file not shown.

@ -1,5 +1,6 @@
npm start & npm start &
cd src/backend cd src/backend
for fname in "$@"; do read -e -p "Provide Log file: " log
node logreader.js $fname for fname in "$log"; do
node logreader.js "$fname"
done done

@ -40,6 +40,10 @@
width:48px; width:48px;
height:52px; height:52px;
} }
.score{
color:#fff !important;
text-shadow: 0 0 4px #c971a4,0 0 8px #c971a4,0 0 12px #c971a4, 0 0 16px #fff,0 0 20px #c971a4;
}
.right{ .right{
margin: auto; margin: auto;

@ -15,7 +15,7 @@
.dotused { .dotused {
background-color:rgba(0,0,0,0.0); background-color:rgba(0,0,0,0.0);
border:4px solid rgba(255,255,150,0.6); border:4px solid rgba(255,255,150,0.9);
border-radius:50%; border-radius:50%;
-moz-border-radius:50%; -moz-border-radius:50%;
-webkit-border-radius:50%; -webkit-border-radius:50%;
@ -40,6 +40,10 @@
width:48px; width:48px;
height:52px; height:52px;
} }
.score{
color:#000 !important;
text-shadow: 0 0 4px #c971a4,0 0 8px #c971a4,0 0 12px #c971a4, 0 0 16px #fff,0 0 20px #c971a4;
}
.right{ .right{
margin: auto; margin: auto;

@ -65,6 +65,8 @@ function App() {
<img src="./layout.png"/> <img src="./layout.png"/>
{data&&<> {data&&<>
<div className="floating score" style={{left:190-CenterAlignAdjust(data.points,42),top:40,fontSize:42,color:"rgb(219,209,200)"}}>
{data.points}</div>
<div className="floating" style={{left:403,top:40,fontSize:42,color:"rgb(219,209,200)"}}> <div className="floating" style={{left:403,top:40,fontSize:42,color:"rgb(219,209,200)"}}>
{FormatFloor(data.floor)}</div> {FormatFloor(data.floor)}</div>

@ -65,13 +65,15 @@ function App() {
<img src="./layout.png"/> <img src="./layout.png"/>
{data&&<> {data&&<>
<div className="floating" style={{left:190-CenterAlignAdjust(data.points,42),top:40,fontSize:42,color:"rgb(219,209,200)"}}>
{data.points}</div>
<div className="floating" style={{left:403,top:40,fontSize:42,color:"rgb(219,209,200)"}}> <div className="floating" style={{left:403,top:40,fontSize:42,color:"rgb(219,209,200)"}}>
{FormatFloor(data.floor)}</div> {FormatFloor(data.floor)}</div>
{ {
data.pomander.map((pom,i)=>{ data.pomander.map((pom,i)=>{
return <> return <>
{NameMatches(i)==2?<div className="floating dot" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>:NameMatches(i)==1&&<div className="floating dotused" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>} {NameMatches(i)==1?<div className="floating dot" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>:NameMatches(i)==2&&<div className="floating dotused" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>}
<div className="floating current" style={{left:48+(i%6)*64,top:80+Math.floor(i/6)*64,fontSize:24}}> <div className="floating current" style={{left:48+(i%6)*64,top:80+Math.floor(i/6)*64,fontSize:24}}>
{pom[1]}</div> {pom[1]}</div>
<div className="floating alltime" style={{left:48+(i%6)*64,top:104+Math.floor(i/6)*64,fontSize:24}}> <div className="floating alltime" style={{left:48+(i%6)*64,top:104+Math.floor(i/6)*64,fontSize:24}}>

@ -1,183 +0,0 @@
{
"pomander": [
[
0,
0,
93
],
[
0,
0,
130
],
[
0,
0,
188
],
[
0,
0,
175
],
[
0,
0,
60
],
[
0,
0,
75
],
[
0,
0,
84
],
[
0,
0,
84
],
[
0,
0,
119
],
[
0,
0,
115
],
[
0,
0,
90
],
[
0,
0,
95
],
[
0,
0,
108
],
[
0,
0,
117
],
[
0,
0,
34
],
[
0,
0,
45
]
],
"accursed_hoard": [
[
0,
19
],
[
0,
35
],
[
0,
16
],
[
0,
8
]
],
"mimics": [
0,
0
],
"traps": [
[
0,
26
],
[
0,
19
],
[
0,
43
],
[
0,
36
],
[
0,
20
]
],
"floor_effects": [
[
0,
23
],
[
0,
29
],
[
0,
21
],
[
0,
26
],
[
0,
14
],
[
0,
9
],
[
0,
22
],
[
0,
16
],
[
0,
17
],
[
0,
12
],
[
0,
17
]
],
"death_count": [
1,
10
],
"floor": 0,
"accursed_hoard_detected": false,
"previous_pomander": "",
"floor_storage": {},
"floor_buff_storage": {}
}

@ -1,193 +1,192 @@
{ {
"pomander": [ "pomander": [
[ [
1, 0,
1, 0,
3 95
], ],
[ [
0, 0,
1, 0,
4 132
], ],
[ [
1, 0,
1, 0,
3 191
], ],
[ [
1, 0,
1, 0,
1 176
], ],
[ [
0, 0,
1, 0,
2 61
], ],
[ [
0, 0,
0, 0,
0 75
], ],
[ [
0, 0,
0, 0,
0 84
], ],
[ [
0, 0,
0, 0,
0 84
], ],
[ [
0, 0,
0, 0,
0 121
], ],
[ [
0, 0,
0, 0,
0 116
], ],
[ [
0, 0,
0, 0,
0 90
], ],
[ [
0, 0,
0, 0,
0 95
], ],
[ [
0, 0,
0, 0,
1 110
], ],
[ [
0, 0,
1, 0,
1 117
], ],
[ [
0, 0,
0, 0,
0 34
], ],
[ [
0, 0,
0, 0,
0 45
] ]
], ],
"accursed_hoard": [ "accursed_hoard": [
[ [
1, 0,
1 19
], ],
[ [
0, 0,
0 35
], ],
[ [
0, 0,
0 16
], ],
[ [
0, 0,
0 8
] ]
], ],
"mimics": [ "mimics": [
6, 0,
0 0
], ],
"traps": [ "traps": [
[ [
0, 0,
0 26
], ],
[ [
0, 0,
1 19
], ],
[ [
0, 0,
0 43
], ],
[ [
0, 0,
0 37
], ],
[ [
0, 0,
0 20
] ]
], ],
"floor_effects": [ "floor_effects": [
[ [
0, 0,
0 24
], ],
[ [
0, 0,
1 30
], ],
[ [
0, 0,
0 21
], ],
[ [
0, 0,
0 26
], ],
[ [
0, 0,
0 14
], ],
[ [
0, 0,
0 9
], ],
[ [
0, 0,
0 23
], ],
[ [
0, 0,
0 16
], ],
[ [
0, 0,
0 17
], ],
[ [
0, 0,
0 12
], ],
[ [
0, 0,
0 17
] ]
], ],
"death_count": [ "death_count": [
0, 1,
1 10
], ],
"floor": 2, "floor": 0,
"accursed_hoard_detected": false, "accursed_hoard_detected": false,
"previous_pomander": "", "previous_pomander": "",
"floor_storage": { "floor_storage": {},
"sight": 0,
"intuition": 0
},
"floor_buff_storage": {}, "floor_buff_storage": {},
"kills": 54, "kills": 0,
"rare_kills": 0, "rare_kills": 0,
"mimic": 0, "mimic": 0,
"mandragora": 0, "mandragora": 0,
"currentLevel": 7, "currentLevel": 1,
"startLevel": 1, "startLevel": 1,
"points": 10838 "points": 0,
"fully_explored": true,
"time_bonus": true
} }

@ -1,98 +1,98 @@
{ {
"pomander": [ "pomander": [
[ [
3, 0,
1, 0,
6 95
], ],
[ [
3,
0, 0,
9 0,
132
], ],
[ [
3,
0, 0,
23 0,
191
], ],
[ [
3,
0, 0,
16 0,
176
], ],
[ [
3,
0, 0,
7 0,
61
], ],
[ [
3,
0, 0,
4 0,
75
], ],
[ [
3,
0, 0,
14 0,
84
], ],
[ [
3,
0, 0,
8 0,
84
], ],
[ [
3,
0, 0,
11 0,
121
], ],
[ [
3, 0,
1, 0,
20 116
], ],
[ [
3,
0, 0,
13 0,
90
], ],
[ [
2,
0, 0,
12 0,
95
], ],
[ [
3,
0, 0,
8 0,
110
], ],
[ [
3,
0, 0,
12 0,
117
], ],
[ [
0, 0,
0, 0,
4 34
], ],
[ [
0, 0,
0, 0,
7 45
] ]
], ],
"accursed_hoard": [ "accursed_hoard": [
[ [
0, 0,
0 19
], ],
[ [
0, 0,
0 35
], ],
[ [
0, 0,
3 16
], ],
[ [
0, 0,
@ -100,87 +100,93 @@
] ]
], ],
"mimics": [ "mimics": [
2, 0,
0 0
], ],
"traps": [ "traps": [
[ [
0, 0,
1 26
], ],
[ [
0, 0,
2 19
], ],
[ [
0, 0,
1 43
], ],
[ [
0, 1,
4 37
], ],
[ [
0, 0,
1 20
] ]
], ],
"floor_effects": [ "floor_effects": [
[ [
0, 1,
0 24
], ],
[ [
0, 1,
2 30
], ],
[ [
0, 0,
4 21
], ],
[ [
0, 0,
4 26
], ],
[ [
0, 0,
1 14
], ],
[ [
0, 0,
0 9
], ],
[ [
0, 1,
1 23
], ],
[ [
0, 0,
1 16
], ],
[ [
0, 0,
1 17
], ],
[ [
0, 0,
0 12
], ],
[ [
0, 0,
3 17
] ]
], ],
"death_count": [ "death_count": [
0, 1,
3 10
], ],
"floor": 0, "floor": 0,
"accursed_hoard_detected": false, "accursed_hoard_detected": false,
"previous_pomander": "safety", "previous_pomander": "",
"floor_storage": { "floor_storage": {},
"witching": 1, "floor_buff_storage": {},
"safety": 0 "kills": 0,
}, "rare_kills": 0,
"floor_buff_storage": {} "mimic": 0,
"mandragora": 0,
"currentLevel": 1,
"startLevel": 1,
"points": 0,
"fully_explored": true,
"time_bonus": true
} }

@ -70,6 +70,7 @@ var startLevel=1;
var points=0; var points=0;
var fully_explored=true; var fully_explored=true;
var time_bonus=true; var time_bonus=true;
var started=false;
const POMANDER_NAMES = [ const POMANDER_NAMES = [
"safety", "safety",
@ -131,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
} }
@ -166,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,
} }
} }
@ -241,9 +244,9 @@ function ParseString(str) {
points+=15150 points+=15150
} }
if (floor===51||floor===101) { if (floor===51||floor===101) {
points+=750 points+=75750
} else { } else {
points+=300*101 points+=30300
} }
} }
previous_pomander="" previous_pomander=""
@ -252,6 +255,7 @@ function ParseString(str) {
fully_explored=true; fully_explored=true;
accursed_hoard_detected=false accursed_hoard_detected=false
time_bonus=true time_bonus=true
started=true
update_file=true update_file=true
} else } else
if (split[4].includes("0) has ended.")) { if (split[4].includes("0) has ended.")) {
@ -285,6 +289,7 @@ function ParseString(str) {
points=0; points=0;
fully_explored=true; fully_explored=true;
time_bonus=true; time_bonus=true;
started=false
update_file=true update_file=true
} else } else
if (split[4].includes("The enfeebling trap is triggered...")) { if (split[4].includes("The enfeebling trap is triggered...")) {
@ -454,13 +459,16 @@ 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 } 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) { if (split.length==22&&started) {
if (split[0]==="04") { if (split[0]==="04") {
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",

@ -70,6 +70,7 @@ var startLevel=1;
var points=0; var points=0;
var fully_explored=true; var fully_explored=true;
var time_bonus=true; var time_bonus=true;
var started=false;
const POMANDER_NAMES = [ const POMANDER_NAMES = [
"safety", "safety",
@ -241,9 +242,9 @@ function ParseString(str) {
points+=15150 points+=15150
} }
if (floor===51||floor===101) { if (floor===51||floor===101) {
points+=750 points+=75750
} else { } else {
points+=300*101 points+=30300
} }
} }
previous_pomander="" previous_pomander=""
@ -252,6 +253,7 @@ function ParseString(str) {
fully_explored=true; fully_explored=true;
accursed_hoard_detected=false accursed_hoard_detected=false
time_bonus=true time_bonus=true
started=true
update_file=true update_file=true
} else } else
if (split[4].includes("0) has ended.")) { if (split[4].includes("0) has ended.")) {
@ -285,6 +287,7 @@ function ParseString(str) {
points=0; points=0;
fully_explored=true; fully_explored=true;
time_bonus=true; time_bonus=true;
started=false
update_file=true update_file=true
} else } else
if (split[4].includes("The enfeebling trap is triggered...")) { if (split[4].includes("The enfeebling trap is triggered...")) {
@ -460,7 +463,7 @@ function ParseString(str) {
points+=101 points+=101
//console.log("Treasure coffer: "+points) //console.log("Treasure coffer: "+points)
} else } else
if (split.length==22) { if (split.length==22&&started) {
if (split[0]==="04") { if (split[0]==="04") {
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",
@ -485,6 +488,7 @@ function ParseString(str) {
mandragora++; mandragora++;
points+=505 points+=505
} else { } else {
points+=100+Math.floor(floor/2)+(floor>=101?101:0)
kills++; kills++;
} }
update_file=true; update_file=true;

Loading…
Cancel
Save