diff --git a/public/layout.png b/public/layout.png index 471c010..f775c99 100644 Binary files a/public/layout.png and b/public/layout.png differ diff --git a/public/layout.xcf b/public/layout.xcf new file mode 100644 index 0000000..70ce389 Binary files /dev/null and b/public/layout.xcf differ diff --git a/src/backend/logreader.js b/src/backend/logreader.js index ed450d3..b2558fd 100644 --- a/src/backend/logreader.js +++ b/src/backend/logreader.js @@ -24,6 +24,7 @@ var accursed_hoard=[ [0,0], [0,0], ]; +var mimics=[0,0] var traps=[ [0,0], [0,0], @@ -46,18 +47,222 @@ var floor_effects=[ ]; var death_count=[0,0]; var floor=0; +var accursed_hoard_detected=false + +const POMANDER_NAMES = [ + "safety", + "sight", + "strength", + "steel", + "affluence", + "flight", + "alteration", + "purity", + "fortune", + "witching", + "serenity", + "rage", + "lust", + "intuition", + "raising", + "resolution",] + +const IMPEDING = 0 +const TOADING = 1 +const LANDMINE = 2 +const LURING = 3 +const ENFEEBLING = 4 var options = { fromBeginning:false, useWatchFile:true } +var previous_pomander="" +var floor_storage={} + tail = new Tail(process.argv[2], options); + +function GetPomanderSlot(str) { + for (var i=0;i0) { + floor_storage[pomander_name]-- + } else { + pomander[pomander_slot][1]++ + pomander[pomander_slot][2]++ + mimics[0]++ + } + } else + if (split[4].includes("You sense the Accursed Hoard calling you...")) { + accursed_hoard_detected=true + } else + if (split[4].includes("You discover a piece of the Accursed Hoard!")) { + accursed_hoard_detected=false + if (floor<=50) { + accursed_hoard[0][0]++ + accursed_hoard[0][1]++ + } else + if (floor<=100) { + accursed_hoard[1][0]++ + accursed_hoard[1][1]++ + } else + if (floor<=150) { + accursed_hoard[2][0]++ + accursed_hoard[2][1]++ + } else { + accursed_hoard[3][0]++ + accursed_hoard[3][1]++ + } + } else + if (split[4].includes("You are revived!")) { + death_count[0]++ + death_count[1]++ + } else + 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]++ + } else + if (split[4].includes("An ancient enchantment revitalizes your body and mind.")) { + floor_effects[1][0]++ + floor_effects[1][1]++ + } else + if (split[4].includes("The gathering gloom appears to invigorate the floor's denizens.")) { + floor_effects[2][0]++ + floor_effects[2][1]++ + } 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]++ + } else + if (split[4].includes("The items in your bag have temporarily transformed into worthless stone.")) { + floor_effects[4][0]++ + floor_effects[4][1]++ + } 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]++ + } else + if (split[4].includes("An ancient enchantment saps your health.")) { + floor_effects[6][0]++ + floor_effects[6][1]++ + } else + if (split[4].includes("An ancient enchantment saps your very strength, weakening your blows.")) { + floor_effects[7][0]++ + floor_effects[7][1]++ + } 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]++ + } else + if (split[4].includes("Your entire body feels heavy.")) { + floor_effects[9][0]++ + floor_effects[9][1]++ + } else + if (split[4].includes("You find yourself short of breath, unable to sprint.")) { + floor_effects[10][0]++ + floor_effects[10][1]++ + } } } diff --git a/src/backend/logreader.js.bak b/src/backend/logreader.js.bak index c24af35..50a0965 100644 --- a/src/backend/logreader.js.bak +++ b/src/backend/logreader.js.bak @@ -18,18 +18,249 @@ var pomander = [ [0,0,0], [0,0,0], ]; +var accursed_hoard=[ + [0,0], + [0,0], + [0,0], + [0,0], + ]; +var mimics=[0,0] +var traps=[ + [0,0], + [0,0], + [0,0], + [0,0], + [0,0], + ]; +var floor_effects=[ + [0,0], + [0,0], + [0,0], + [0,0], + [0,0], + [0,0], + [0,0], + [0,0], + [0,0], + [0,0], + [0,0], + ]; +var death_count=[0,0]; +var floor=0; +var accursed_hoard_detected=false + +const POMANDER_NAMES = [ + "safety", + "sight", + "strength", + "steel", + "affluence", + "flight", + "alteration", + "purity", + "fortune", + "witching", + "serenity", + "rage", + "lust", + "intuition", + "raising", + "resolution",] + +const IMPEDING = 0 +const TOADING = 1 +const LANDMINE = 2 +const LURING = 3 +const ENFEEBLING = 4 var options = { fromBeginning:false, useWatchFile:true } +var previous_pomander="" +var floor_storage={} + tail = new Tail(process.argv[2], options); + +function GetPomanderSlot(str) { + for (var i=0;i0) { + floor_storage[pomander_name]-- + } else { + pomander[pomander_slot][1]++ + pomander[pomander_slot][2]++ + } + } else + if (split[4].includes("You sense the Accursed Hoard calling you...")) { + accursed_hoard_detected=true + } else + if (split[4].includes("You discover a piece of the Accursed Hoard!")) { + accursed_hoard_detected=false + if (floor<=50) { + accursed_hoard[0][0]++ + accursed_hoard[0][1]++ + } else + if (floor<=100) { + accursed_hoard[1][0]++ + accursed_hoard[1][1]++ + } else + if (floor<=150) { + accursed_hoard[2][0]++ + accursed_hoard[2][1]++ + } else { + accursed_hoard[3][0]++ + accursed_hoard[3][1]++ + } + } else + if (split[4].includes("You are revived!")) { + death_count[0]++ + death_count[1]++ + } else + 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]++ + } else + if (split[4].includes("An ancient enchantment revitalizes your body and mind.")) { + floor_effects[1][0]++ + floor_effects[1][1]++ + } else + if (split[4].includes("The gathering gloom appears to invigorate the floor's denizens.")) { + floor_effects[2][0]++ + floor_effects[2][1]++ + } 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]++ + } else + if (split[4].includes("The items in your bag have temporarily transformed into worthless stone.")) { + floor_effects[4][0]++ + floor_effects[4][1]++ + } 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]++ + } else + if (split[4].includes("An ancient enchantment saps your health.")) { + floor_effects[6][0]++ + floor_effects[6][1]++ + } else + if (split[4].includes("An ancient enchantment saps your very strength, weakening your blows.")) { + floor_effects[7][0]++ + floor_effects[7][1]++ + } 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]++ + } else + if (split[4].includes("Your entire body feels heavy.")) { + floor_effects[9][0]++ + floor_effects[9][1]++ + } else + if (split[4].includes("You find yourself short of breath, unable to sprint.")) { + floor_effects[10][0]++ + floor_effects[10][1]++ + } } }