diff --git a/src/backend/data.json b/src/backend/data.json
index bad33a9..b088bea 100644
--- a/src/backend/data.json
+++ b/src/backend/data.json
@@ -1,90 +1,90 @@
{
"pomander": [
[
- 0,
- 0,
- 0
+ 3,
+ 1,
+ 6
],
[
- 0,
- 0,
- 0
+ 3,
+ 3,
+ 12
],
[
- 0,
- 0,
- 0
+ 3,
+ 1,
+ 24
],
[
- 0,
- 0,
- 0
+ 3,
+ 1,
+ 17
],
[
+ 3,
0,
- 0,
- 0
+ 7
],
[
- 0,
- 0,
- 0
+ 3,
+ 1,
+ 5
],
[
+ 3,
0,
- 0,
- 0
+ 14
],
[
+ 3,
0,
- 0,
- 0
+ 8
],
[
- 0,
- 0,
- 0
+ 3,
+ 3,
+ 14
],
[
- 0,
- 4,
- 4
+ 3,
+ 1,
+ 20
],
[
+ 3,
0,
- 0,
- 0
+ 13
],
[
- 0,
- 0,
- 0
+ 3,
+ 1,
+ 13
],
[
- 9,
- 19,
- 19
+ 2,
+ 0,
+ 8
],
[
- 0,
- 0,
- 0
+ 3,
+ 1,
+ 13
],
[
+ 3,
0,
- 4,
4
],
[
- 0,
- 0,
- 0
+ 1,
+ 1,
+ 8
]
],
"accursed_hoard": [
[
- 2,
- 3
+ 0,
+ 0
],
[
0,
@@ -92,37 +92,37 @@
],
[
0,
- 0
+ 3
],
[
0,
- 0
+ 8
]
],
"mimics": [
- 20,
- 3
+ 14,
+ 0
],
"traps": [
[
- 0,
- 0
+ 1,
+ 2
],
[
0,
- 0
+ 2
],
[
- 3,
- 4
+ 1,
+ 2
],
[
0,
- 0
+ 4
],
[
- 3,
- 4
+ 0,
+ 1
]
],
"floor_effects": [
@@ -132,56 +132,56 @@
],
[
0,
- 0
+ 2
],
[
0,
- 0
+ 4
],
[
- 0,
- 0
+ 1,
+ 5
],
[
- 0,
- 0
+ 1,
+ 2
],
[
0,
0
],
[
- 0,
- 0
+ 1,
+ 2
],
[
0,
- 0
+ 1
],
[
0,
- 0
+ 1
],
[
- 2,
- 3
+ 0,
+ 0
],
[
0,
- 0
+ 3
]
],
"death_count": [
- 4,
- 6
+ 0,
+ 3
],
- "floor": 13,
+ "floor": 64,
"accursed_hoard_detected": false,
- "previous_pomander": "lust",
+ "previous_pomander": "fortune",
"floor_storage": {
- "lust": 1
+ "fortune": 1
},
"floor_buff_storage": {
- "9": true
+ "4": true
}
}
\ No newline at end of file
diff --git a/src/backend/data.json.bak b/src/backend/data.json.bak
new file mode 100644
index 0000000..bcef02c
--- /dev/null
+++ b/src/backend/data.json.bak
@@ -0,0 +1,186 @@
+{
+ "pomander": [
+ [
+ 3,
+ 1,
+ 6
+ ],
+ [
+ 3,
+ 0,
+ 9
+ ],
+ [
+ 3,
+ 0,
+ 23
+ ],
+ [
+ 3,
+ 0,
+ 16
+ ],
+ [
+ 3,
+ 0,
+ 7
+ ],
+ [
+ 3,
+ 0,
+ 4
+ ],
+ [
+ 3,
+ 0,
+ 14
+ ],
+ [
+ 3,
+ 0,
+ 8
+ ],
+ [
+ 3,
+ 0,
+ 11
+ ],
+ [
+ 3,
+ 1,
+ 20
+ ],
+ [
+ 3,
+ 0,
+ 13
+ ],
+ [
+ 2,
+ 0,
+ 12
+ ],
+ [
+ 3,
+ 0,
+ 8
+ ],
+ [
+ 3,
+ 0,
+ 12
+ ],
+ [
+ 0,
+ 0,
+ 4
+ ],
+ [
+ 0,
+ 0,
+ 7
+ ]
+ ],
+ "accursed_hoard": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 3
+ ],
+ [
+ 0,
+ 8
+ ]
+ ],
+ "mimics": [
+ 2,
+ 0
+ ],
+ "traps": [
+ [
+ 0,
+ 1
+ ],
+ [
+ 0,
+ 2
+ ],
+ [
+ 0,
+ 1
+ ],
+ [
+ 0,
+ 4
+ ],
+ [
+ 0,
+ 1
+ ]
+ ],
+ "floor_effects": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 2
+ ],
+ [
+ 0,
+ 4
+ ],
+ [
+ 0,
+ 4
+ ],
+ [
+ 0,
+ 1
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 1
+ ],
+ [
+ 0,
+ 1
+ ],
+ [
+ 0,
+ 1
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 3
+ ]
+ ],
+ "death_count": [
+ 0,
+ 3
+ ],
+ "floor": 0,
+ "accursed_hoard_detected": false,
+ "previous_pomander": "safety",
+ "floor_storage": {
+ "witching": 1,
+ "safety": 0
+ },
+ "floor_buff_storage": {}
+}
\ No newline at end of file
diff --git a/src/backend/logreader.js b/src/backend/logreader.js
index 667a768..a873213 100644
--- a/src/backend/logreader.js
+++ b/src/backend/logreader.js
@@ -160,6 +160,13 @@ function ParseString(str) {
pomander[pomander_slot][0]-=1
update_file=true
} else
+ if (split[4].includes("uses a pomander of ")) {
+ var pomander_name=split[4].substring(split[4].indexOf("uses a pomander of ")+"uses a pomander of ".length)
+ pomander_name=pomander_name.substring(0,pomander_name.length-1)
+ var pomander_slot = GetPomanderSlot(pomander_name)
+ pomander[pomander_slot][0]-=1
+ update_file=true
+ } else
if (split[4].includes("You cannot carry any more of that item.")) {
var pomander_name=split[4].substring("You return the pomander of ".length)
pomander_name=pomander_name.replace(" to the coffer. You cannot carry any more of that item.","")
@@ -206,6 +213,7 @@ function ParseString(str) {
accursed_hoard_detected=false
for (var i=0;i
0) {
+ if (pomander_name in floor_storage&&floor_storage[pomander_name]>0) {
floor_storage[pomander_name]--
+ previous_pomander=""
} else {
pomander[pomander_slot][1]++
pomander[pomander_slot][2]++
@@ -292,67 +301,67 @@ function ParseString(str) {
if (split[4].includes("An ancient enchantment stimulates your humours, increasing the speed with which you act.")) {
floor_effects[0][0]++
floor_effects[0][1]++
- floor_buff_storage={0:true}
+ floor_buff_storage={...floor_buff_storage,0:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment revitalizes your body and mind.")) {
floor_effects[1][0]++
floor_effects[1][1]++
- floor_buff_storage={1:true}
+ floor_buff_storage={...floor_buff_storage,1:true}
update_file=true
} else
if (split[4].includes("The gathering gloom appears to invigorate the floor's denizens.")) {
floor_effects[2][0]++
floor_effects[2][1]++
- floor_buff_storage={2:true}
+ floor_buff_storage={...floor_buff_storage,2:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment clouds your eyes, making it difficult to discern your quarry.")) {
floor_effects[3][0]++
floor_effects[3][1]++
- floor_buff_storage={3:true}
+ floor_buff_storage={...floor_buff_storage,3:true}
update_file=true
} else
if (split[4].includes("The items in your bag have temporarily transformed into worthless stone.")) {
floor_effects[4][0]++
floor_effects[4][1]++
- floor_buff_storage={4:true}
+ floor_buff_storage={...floor_buff_storage,4:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment clouds your mind, making it impossible to remember previously learned abilities.")) {
floor_effects[5][0]++
floor_effects[5][1]++
- floor_buff_storage={5:true}
+ floor_buff_storage={...floor_buff_storage,5:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment saps your health.")) {
floor_effects[6][0]++
floor_effects[6][1]++
- floor_buff_storage={6:true}
+ floor_buff_storage={...floor_buff_storage,6:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment saps your very strength, weakening your blows.")) {
floor_effects[7][0]++
floor_effects[7][1]++
- floor_buff_storage={7:true}
+ floor_buff_storage={...floor_buff_storage,7:true}
update_file=true
} else
if (split[4].includes("Your body is fatigued and wounds refuse to heal on their own.")) {
floor_effects[8][0]++
floor_effects[8][1]++
- floor_buff_storage={8:true}
+ floor_buff_storage={...floor_buff_storage,8:true}
update_file=true
} else
if (split[4].includes("Your entire body feels heavy.")) {
floor_effects[9][0]++
floor_effects[9][1]++
- floor_buff_storage={9:true}
+ floor_buff_storage={...floor_buff_storage,9:true}
update_file=true
} else
if (split[4].includes("You find yourself short of breath, unable to sprint.")) {
floor_effects[10][0]++
floor_effects[10][1]++
- floor_buff_storage={10:true}
+ floor_buff_storage={...floor_buff_storage,10:true}
update_file=true
}
diff --git a/src/backend/logreader.js.bak b/src/backend/logreader.js.bak
index ac72da7..a7e299c 100644
--- a/src/backend/logreader.js.bak
+++ b/src/backend/logreader.js.bak
@@ -96,6 +96,7 @@ var options = {
var previous_pomander=""
var floor_storage={}
+var floor_buff_storage={}
var update_file=false;
tail = new Tail(process.argv[2], options);
@@ -114,6 +115,7 @@ if (fs.existsSync('./data.json')) {
accursed_hoard_detected=master_obj.accursed_hoard_detected
previous_pomander=master_obj.previous_pomander
floor_storage=master_obj.floor_storage
+ floor_buff_storage=master_obj.floor_buff_storage
}
@@ -139,6 +141,7 @@ function CreateMasterObj() {
accursed_hoard_detected:accursed_hoard_detected,
previous_pomander:previous_pomander,
floor_storage:floor_storage,
+ floor_buff_storage:floor_buff_storage,
}
}
@@ -157,6 +160,13 @@ function ParseString(str) {
pomander[pomander_slot][0]-=1
update_file=true
} else
+ if (split[4].includes("uses a pomander of ")) {
+ var pomander_name=split[4].substring(split[4].indexOf("uses a pomander of ")+"uses a pomander of ".length)
+ pomander_name=pomander_name.substring(0,pomander_name.length-1)
+ var pomander_slot = GetPomanderSlot(pomander_name)
+ pomander[pomander_slot][0]-=1
+ update_file=true
+ } else
if (split[4].includes("You cannot carry any more of that item.")) {
var pomander_name=split[4].substring("You return the pomander of ".length)
pomander_name=pomander_name.replace(" to the coffer. You cannot carry any more of that item.","")
@@ -179,6 +189,7 @@ function ParseString(str) {
floor=Number(fl)
previous_pomander=""
floor_storage={}
+ floor_buff_storage={}
accursed_hoard_detected=false
update_file=true
} else
@@ -188,6 +199,7 @@ function ParseString(str) {
floor=Number(fl)
previous_pomander=""
floor_storage={}
+ floor_buff_storage={}
accursed_hoard_detected=false
update_file=true
} else
@@ -197,9 +209,11 @@ function ParseString(str) {
floor=0
previous_pomander=""
floor_storage={}
+ floor_buff_storage={}
accursed_hoard_detected=false
for (var i=0;i0) {
+ if (pomander_name in floor_storage&&floor_storage[pomander_name]>0) {
floor_storage[pomander_name]--
+ previous_pomander=""
} else {
pomander[pomander_slot][1]++
pomander[pomander_slot][2]++
@@ -286,56 +301,67 @@ function ParseString(str) {
if (split[4].includes("An ancient enchantment stimulates your humours, increasing the speed with which you act.")) {
floor_effects[0][0]++
floor_effects[0][1]++
+ floor_buff_storage={0:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment revitalizes your body and mind.")) {
floor_effects[1][0]++
floor_effects[1][1]++
+ floor_buff_storage={1:true}
update_file=true
} else
if (split[4].includes("The gathering gloom appears to invigorate the floor's denizens.")) {
floor_effects[2][0]++
floor_effects[2][1]++
+ floor_buff_storage={2:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment clouds your eyes, making it difficult to discern your quarry.")) {
floor_effects[3][0]++
floor_effects[3][1]++
+ floor_buff_storage={3:true}
update_file=true
} else
if (split[4].includes("The items in your bag have temporarily transformed into worthless stone.")) {
floor_effects[4][0]++
floor_effects[4][1]++
+ floor_buff_storage={4:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment clouds your mind, making it impossible to remember previously learned abilities.")) {
floor_effects[5][0]++
floor_effects[5][1]++
+ floor_buff_storage={5:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment saps your health.")) {
floor_effects[6][0]++
floor_effects[6][1]++
+ floor_buff_storage={6:true}
update_file=true
} else
if (split[4].includes("An ancient enchantment saps your very strength, weakening your blows.")) {
floor_effects[7][0]++
floor_effects[7][1]++
+ floor_buff_storage={7:true}
update_file=true
} else
if (split[4].includes("Your body is fatigued and wounds refuse to heal on their own.")) {
floor_effects[8][0]++
floor_effects[8][1]++
+ floor_buff_storage={8:true}
update_file=true
} else
if (split[4].includes("Your entire body feels heavy.")) {
floor_effects[9][0]++
floor_effects[9][1]++
+ floor_buff_storage={9:true}
update_file=true
} else
if (split[4].includes("You find yourself short of breath, unable to sprint.")) {
floor_effects[10][0]++
floor_effects[10][1]++
+ floor_buff_storage={10:true}
update_file=true
}