diff --git a/scripts/scrape-special.ts b/scripts/scrape-special.ts deleted file mode 100644 index 922ca57d..00000000 --- a/scripts/scrape-special.ts +++ /dev/null @@ -1,30 +0,0 @@ -const fs = require('fs') -const nfetch = require('node-fetch') - -interface ApiItems { - result: Array<{ - label: string, - entries: Array<{ - name?: string - type?: string - }> - }> -} - -(async function () { - const response = await nfetch('https://www.pathofexile.com/api/trade/data/items') - const { result }: ApiItems = await response.json() - const prophecies = result - .find(category => category.label === 'Prophecies')! - .entries - .map(item => item.name) - - fs.writeFileSync('./src/data/prophecies.json', JSON.stringify(prophecies, null, 2)) - - const itemisedMonsters = result - .find(category => category.label === 'Itemised Monsters')! - .entries - .map(item => item.type) - - fs.writeFileSync('./src/data/itemised-monsters.json', JSON.stringify(itemisedMonsters, null, 2)) -})() diff --git a/src/assets/data/index.ts b/src/assets/data/index.ts index d6aafef1..c89beffb 100644 --- a/src/assets/data/index.ts +++ b/src/assets/data/index.ts @@ -1,5 +1,3 @@ -import prophecies from './prophecies.json' -import monsters from './itemised-monsters.json' import mods from './mods.json' import baseTypes from './base-types.json' import uniques from './uniques.json' @@ -28,9 +26,6 @@ export interface Mod { }> } -export const Prophecies = new Set(prophecies as string[]) -export const ItemisedMonsters = new Set(monsters as string[]) - export interface BaseType { category: ItemCategory icon?: string diff --git a/src/assets/data/itemised-monsters.json b/src/assets/data/itemised-monsters.json deleted file mode 100644 index 3070ae81..00000000 --- a/src/assets/data/itemised-monsters.json +++ /dev/null @@ -1,553 +0,0 @@ -[ - "Metamorph Brain", - "Metamorph Eye", - "Metamorph Heart", - "Metamorph Liver", - "Metamorph Lung", - "The Grey Plague", - "Mephod, the Earth Scorcher", - "The Steel Soul", - "Guardian of the Chimera", - "Guardian of the Hydra", - "Guardian of the Minotaur", - "Guardian of the Phoenix", - "The Cleansing Light", - "Woad, Mockery of Man", - "Oriath's Virtue", - "Legius Garhall", - "Oriath's Vengeance", - "Oriath's Vigil", - "Barthol, the Corruptor", - "Warmonger", - "Tyrant", - "Blackguard Tempest", - "Blackguard Avenger", - "Piety the Empyrean", - "Nightmare Manifest", - "Master of the Blade", - "Leif, the Swift-Handed", - "Enticer of Rot", - "Witch of the Cauldron", - "Oak the Mighty", - "Aulen Greychain", - "Sumter the Twisted", - "Massier", - "Lord of the Ashen Arrow", - "The Sanguine Siren", - "Marrowcrush", - "The Great White Beast", - "The Great White Bones", - "Cave Beast", - "Shaggy Monstrosity", - "Bone Cruncher", - "Hairy Bonecruncher", - "Thicket Hulk", - "Enraptured Beast", - "Skeletal Beast", - "Corrupted Beast", - "Tyrannursus Maximus", - "Forest Beast", - "Primal Beast", - "Armour Cruncher", - "Infected Beast", - "Risen Infested Beast", - "Beast of the Pits", - "Executioner Bloodwing", - "Calderus", - "Junglemare", - "Mutated Chieftain", - "Crazed Chieftain", - "Blood Progenitor", - "The Primal One", - "Blood Chieftain", - "Carnage Chieftain", - "Stygian Silverback", - "Aboriginal Chieftain", - "Host Chieftain", - "Hollowskull, the Willing Host", - "Simi, the Nature Touched", - "Nassar, Lion of the Seas", - "Sulphurspawn", - "Bazur", - "Penitentiary Incarcerator", - "Fighting Bull", - "Boulderback", - "Crusher of Gladiators", - "Avalanche Rider", - "Grazing Taurus", - "Void Anomaly", - "Avatar of Undoing", - "Rooster Fiend", - "Rooster Demon", - "Eyepecker", - "Stonebeak, Battle Fowl", - "Talon Archer", - "Feral Fowl", - "Bleached Crawler", - "Savage Crab", - "Enraptured Crab", - "Infested Crab", - "Infested Crawler", - "Ambrius, Legion Slayer", - "K'aj Q'ura", - "K'aj Y'ara'az", - "K'aj A'alai", - "The Fallen Queen", - "Lady Stormflay", - "The Hollow Lady", - "The Broken Prince", - "Erebix, Light's Bane", - "Erythrophagia", - "Portentia, the Foul", - "Doedre the Defiler", - "The Hallowed Husk", - "Infected Ambusher", - "Mutated Ursa", - "Plummeting Ursa", - "Tunnelfiend", - "Infested Tunnelfiend", - "Woods Ursa", - "Infested Ursa", - "Q'uru", - "It That Fell", - "Torr Olgosso", - "Damoi Tui", - "Bolt Brownfur, Earth Churner", - "Orra Greengate", - "Thena Moga, the Crimson Storm", - "Augustina Solaria", - "Ion Darkshroud, the Hungering Blade", - "Wilorin Demontamer", - "Eoin Greyfur", - "Igna Phoenix", - "The Forgotten Soldier", - "Rabid Maw", - "Mutated Maw", - "Fetid Maw", - "Filth Maw", - "Spinesnap", - "Varhesh, Shimmering Aberration", - "Infested Maw", - "Bestial Maw", - "Blue Frog", - "Common Frog", - "Strange Frog", - "Hephaeus, The Hammer", - "Stalker of the Endless Dunes", - "Captain Tanner Lightfoot", - "Mutated Croaker", - "Putrid Chimeral", - "Twisted Chimeral", - "Chimeric Croaker", - "Vaulting Croaker", - "Genesis Paradisae", - "Chrome-infused Croaker", - "Chrome-touched Croaker", - "Plumed Chimeral", - "Feral Chimeral", - "Paradisae Venenum", - "Alpha Paradisae", - "The Basilisk", - "The Gorgon", - "Chrome-infused Chimeral", - "Chrome-touched Chimeral", - "Sallazzang", - "Wild Chimeral", - "Pesquin, the Mad Baron", - "Telvar, the Inebriated", - "Avatar of the Forge", - "Avatar of the Skies", - "Avatar of the Huntress", - "Bringer of Blood", - "Konu, Maker of Wind", - "Goatman", - "Goatman Stomper", - "Rek'tar, the Breaker", - "The Faun", - "Elder-Blessed Goatman", - "Bearded Devil", - "Guardian of the Mound", - "Ungulath", - "Sheaq, Maker of Floods", - "Goatman Shaman", - "Goatman Fire-raiser", - "Bearded Shaman", - "Bearded Skycaller", - "Colossus Crusher", - "Alpine Devil", - "Hill Devil", - "Alpine Shaman", - "Sebbert, Crescent's Point", - "Jorus, Sky's Edge", - "Herald of Ashes", - "Herald of Thunder", - "Breaker Toruul", - "Flame Hellion", - "Ruins Hellion", - "The Burning Menace", - "Shackled Hellion", - "Mountain Hellion", - "Mountain Hellion Alpha", - "Enslaved Hellion", - "Dune Hellion", - "Elder-Blessed Hellion", - "Bladetooth", - "Fury Hound", - "War Hound", - "Raihara, Tukohama's Loyal", - "Fragment of Winter", - "Shadow of the Vaal", - "Carrion Minion", - "Carrion Swarmer", - "Carrion Burrower", - "Scum Crawler", - "Nightmarish Crawler", - "Mother of the Swarm", - "The Sunburst Queen", - "Rabid Broodqueen", - "Mutated Broodqueen", - "Rabid Minion", - "Carrion Queen", - "Gorulis, Will-Thief", - "Nightmarish Carrion", - "The Infernal King", - "Preethi, Eye-Pecker", - "Kitava, The Destroyer", - "Avian Retch", - "Inti of the Blood Moon", - "Gluttonous Gull", - "Elder-Blessed Retch", - "The Goddess", - "Vision of Justice", - "Saqawine Rhex", - "Farric Gargantuan", - "Farric Taurus", - "Farric Chieftain", - "Farric Goliath", - "Fenumal Scorpion", - "Craicic Savage Crab", - "Craicic Spider Crab", - "Farric Ursa", - "Craicic Maw", - "Craicic Chimeral", - "Farric Goatman", - "Farric Flame Hellion Alpha", - "Farric Frost Hellion Alpha", - "Farric Magma Hound", - "Saqawine Chimeral", - "Fenumal Queen", - "Saqawine Retch", - "Farric Lynx Alpha", - "Saqawal, First of the Sky", - "Farric Ape", - "Craiceann, First of the Deep", - "Craicic Vassal", - "Farric Pit Hound", - "Saqawine Rhoa", - "Fenumal Devourer", - "Fenumal Scrabbler", - "Craicic Sand Spitter", - "Craicic Squid", - "Craicic Shield Crab", - "Saqawine Cobra", - "Saqawine Blood Viper", - "Fenumal Widow", - "Fenumal Plagued Arachnid", - "Fenumal Hybrid Arachnid", - "Fenumus, First of the Night", - "Craicic Watcher", - "Farric Tiger Alpha", - "Farrul, First of the Plains", - "Saqawine Vulture", - "Farric Wolf Alpha", - "Stone of the Currents", - "Mutated Flamebeast", - "Crazed Flamebeast", - "Shredder of Gladiators", - "Dire Wolf", - "Arctic Wolf", - "Snow Wolf", - "Freezing Wolf", - "Mountain Lynx", - "Eater of Souls", - "Nightmare's Omen", - "Visceris", - "He of Many Pieces", - "Maligaro the Mutilator", - "Escaped Rhex", - "Wild Rhex", - "Adolescent Rhex", - "Maternal Rhex", - "Unravelling Horror", - "Shrieker Eihal", - "Champion of the Hollows", - "Lord of the Hollows", - "Messenger of the Hollows", - "Spirit of Aidan", - "Spirit of Nadia", - "Blood Ape", - "Dread Primate", - "Infested Ape", - "Stygian Ape", - "Aidan the Frenzied", - "Blood Stasis ", - "Blood Morpher", - "Nadia the Soothing", - "Carnage Ape", - "Barrow Ape", - "Primitive Ape", - "Echo of the Verdant", - "Titan of the Grove", - "Pileah, Corpse Burner", - "Pileah, Burning Corpse", - "Xixic, High Necromancer", - "Brinecrack", - "Waste Lurcher", - "Parasite", - "Ravenous Parasite", - "Vicious Parasite", - "The Encephelophage", - "Plated Parasite", - "Spitting Parasite", - "Poisonous Parasite", - "Brine Vassal", - "Swarthy Mollusc", - "Platinia", - "Auriot", - "Rhodion", - "Pallias", - "Argient", - "Rheniot", - "Pitbull Demon", - "Vicious Hound", - "Steelchaw", - "Gnar, Eater of Carrion", - "The High Templar", - "High Lithomancer", - "Purge Hound", - "Lola, the Fierce", - "Rocco, the Bloodthirsty", - "Drek, Apex Hunter", - "Thraxia", - "Infected Rhoa", - "Rabid Rhoa", - "Mutated Rhoa", - "Drought-Maddened Rhoa", - "Skullbeak", - "Ventarus", - "Rhoa Scavenger", - "Albino Rhoa", - "Great Rhoa", - "Murk Runner", - "Oozeback Bloom", - "The Cadaver Bull", - "Infested Rhoa", - "Bone Rhoa", - "Corrupted Rhoa", - "Bone Scavenger", - "Elder-Blessed Rhoa", - "Zombie Rhoa", - "Ghostram", - "Primordial Rhoa", - "The Eroding One", - "Guardian of the Vault", - "Pirate Treasure", - "Mystic Devourer", - "Devourer", - "Tunnelworm", - "Kamaq, Soilmaker", - "The Conqueror Wurm", - "Tunneltrap", - "Ancient Devourer", - "Dust Scrabbler", - "Dirt Scrabbler", - "Infested Skitterer", - "Lowlands Hopper", - "Sand Skitterer", - "Sand Leaper", - "Quetzerxi", - "Mother of the Hive", - "Gravel Eater", - "Scrabbling Spitter", - "Rock Spitter", - "Crustacean Sniper", - "Crustacean Pelter", - "The Dweller of the Deep", - "Granite Eater", - "Obsidian Eater", - "Infested Sniper", - "Toxic Crawler", - "Sewage Crawler", - "Fossil Eater", - "Glace", - "Megaera", - "Black Scorpion", - "Predatory Scorpion", - "Tamipin", - "Sulphuric Scorpion", - "Sand Scorpion", - "Tamulus", - "Merveil, the Returned", - "Fire and Fury", - "Shock and Horror", - "Fated Siren", - "Merveil's Favoured", - "Ambrosia, Daughter of Merveil", - "The Duchess", - "Rima, Deep Temptress", - "Amarissa, Daughter of Merveil", - "Brood Princess", - "Merveil's Blessed", - "Singing Siren", - "Merveil's Daughter", - "Merveil's Attendant", - "Merveil's Chosen", - "Merveil's Retainer", - "Terror of the Infinite Drifts", - "Gisale, Thought Thief", - "Shavronne the Sickening", - "Fused Crawler", - "Mutated Winterclaw", - "Scrabbling Menace", - "Cave Crustacean", - "Invading Crustacean", - "Shield Crab", - "Bleached Crustacean", - "Shivershell", - "Deep Crustacean", - "Infested Crustacean", - "Thunderskull", - "Belcer, the Pirate Lord", - "Pagan Bishop of Agony", - "Litanius, the Black Prayer", - "Champion of Frost", - "Steelpoint the Avenger", - "Mirage of Bones", - "Burtok, Conjurer of Bones", - "Mutated Adder", - "Infected Adder", - "Putrid Serpent", - "Acid Slitherer", - "Night Adder", - "Host Adder", - "Bramble Cobra", - "Host Cobra", - "Elder-Blessed Cobra", - "Spine Serpent", - "Infested Serpent", - "Thornrunner", - "Maze Slitherer", - "Barb Serpent", - "Sand Serpent", - "Glade Mamba", - "Foreseen Spawn", - "Cursed Spawn", - "Fathom Screamer", - "Siren's Spawn", - "Slimy Bloodsucker", - "Unstable Larva", - "Slimy Nemesis", - "Venomous Spawn", - "Plagued Arachnid", - "Diseased Arachnid", - "Maligaro's Muse", - "Hybrid Arachnid", - "Scalding Arachnid", - "Mutated Arachnid", - "Putrid Weaver", - "Sickly Spinner", - "Arachnoxia", - "Hybrid Widow", - "Spinner of False Hope", - "Queen of the Great Tangle", - "Pewterfang", - "Cintiq, the Inescapable", - "Black Death", - "The Weaver", - "Balah, Duke", - "Lurking Venom", - "Brooding Tarantula", - "Buried Tarantula", - "Maligaro's Inspiration", - "Enraptured Arachnid", - "Virulent Spider", - "Ink Spinner", - "Maze Webspinner", - "Maze Hatchling", - "Corrupted Spitter", - "Corrupted Arach", - "Crypt Weaver", - "Mutant Arach", - "Crypt Ambusher", - "Cave Skitterer", - "Spindle Spider", - "Hatchling", - "Vaal Recluse", - "Arakaali's Daughter", - "Leaping Spider", - "Noxious Tarantula", - "Deadly Tarantula", - "Webbed Spider", - "Infected Spiker", - "Porcupine Goliath", - "Thistlesage", - "Chrome-infused Goliath", - "Chrome-touched Goliath", - "Maze Needleback", - "Bladeback Guardian", - "Infected Watcher", - "Mutated Watcher", - "Soulless Watcher", - "Drifting Eye", - "Cavern Drifter", - "Sewer Drifter", - "Strangledrift", - "The All-seeing Eye", - "Carius, the Unnatural", - "Suncaller Asha", - "The Cursed King", - "Lycius, Midnight's Howl", - "Arwyn, the Houndmaster", - "Forest of Flames", - "Puruna, the Challenger", - "Poporo, the Highest Spire", - "Tahsin, Warmaker", - "Excellis Aurafix", - "Riftwalker", - "The Arbiter of Knowledge", - "Ancient Sculptor", - "Ancient Architect", - "The Reaver", - "Amalgam of Nightmares", - "Armala, the Widow", - "Tore, Towering Ancient", - "Olof, Son of the Headsman", - "The Brittle Emperor", - "Mindless Scavenger", - "Scavenging Vulture", - "Rotting Vulture", - "Infested Vulture", - "The Hundred Foot Shadow", - "The Winged Death", - "Rama, The Kinslayer", - "Kalria, The Fallen", - "Invari, The Bloodshaper", - "Lokan, The Deceiver", - "Marchak, The Betrayer", - "Berrots, The Breaker", - "Vessider, The Unrivaled", - "Morgrants, The Deafening", - "Yorishi, Aurora-sage", - "Jeinei Yuushu", - "Otesha, the Giantslayer", - "Mutewind Lynx", - "Uruk Baleh", - "El'Abin, Bloodeater", - "Leli Goya, Daughter of Ash", - "Bin'aia, Crimson Rain", - "Musky \"Two-Eyes\" Grenn", - "Susara, Siren of Pondium", - "Lussi \"Rotmother\" Roth", - "The Blacksmith", - "Tolman, the Exhumer" -] \ No newline at end of file diff --git a/src/assets/data/prophecies.json b/src/assets/data/prophecies.json deleted file mode 100644 index a73d9b25..00000000 --- a/src/assets/data/prophecies.json +++ /dev/null @@ -1,247 +0,0 @@ -[ - "The Alchemist", - "Anarchy's End I", - "Anarchy's End II", - "Anarchy's End III", - "Anarchy's End IV", - "Ancient Rivalries I", - "Ancient Rivalries II", - "Ancient Rivalries III", - "Ancient Rivalries IV", - "The Twins", - "Possessed Foe", - "The Invader", - "Visions of the Drowned", - "Monstrous Treasure", - "Vaal Invasion", - "The Hungering Swarm", - "The Trembling Earth", - "The Cursed Choir", - "Soil, Worms and Blood", - "The Jeweller's Touch", - "The Forgotten Garrison", - "Song of the Sekhema", - "The Queen's Vaults", - "The Queen's Sacrifice", - "Beyond Sight I", - "Beyond Sight II", - "Beyond Sight III", - "Beyond Sight IV", - "Cold Blooded Fury", - "Reforged Bonds", - "Last of the Wildmen", - "Cold Greed", - "A Valuable Combination", - "The Fortune Teller's Collection", - "The Child of Lunaris", - "Faith Exhumed", - "Twice Enchanted", - "Day of Sacrifice I", - "Day of Sacrifice II", - "Day of Sacrifice III", - "Day of Sacrifice IV", - "Deadly Rivalry I", - "Deadly Rivalry II", - "Deadly Rivalry III", - "Deadly Rivalry IV", - "Deadly Rivalry V", - "The Malevolent Witch", - "Burning Dread", - "Agony at Dusk", - "Blinding Light", - "The Wealthy Exile", - "The Scout", - "Fallow At Last", - "Trapped in the Tower", - "Dark Instincts", - "Plague of Frogs", - "Black Devotion", - "The Bishop's Legacy", - "Pools of Wealth", - "Crimson Hues", - "A Vision of Ice and Fire", - "The Blacksmith", - "A Dishonourable Death", - "End of the Light", - "Nemesis of Greed", - "Battle Hardened", - "Trash to Treasure", - "The Emperor's Trove", - "Path of Betrayal", - "From The Void", - "The Misunderstood Queen", - "Nature's Resilience", - "The Snuffed Flame", - "The King and the Brambles", - "Mouth of Horrors", - "The Servant's Heart", - "The Karui Rebellion", - "The Bloody Flowers Redux", - "The Beginning and the End", - "Heavy Blows", - "Dying Cry", - "Fire and Ice", - "Severed Limbs", - "Fire and Brimstone", - "The Apex Predator", - "The Silverwood", - "The King's Path", - "Hidden Reinforcements", - "The Bowstring's Music", - "Rebirth", - "Power Magnified", - "Gilded Within", - "Ending the Torment", - "Hunter's Lesson", - "Pleasure and Pain", - "The Flow of Energy", - "Winter's Mournful Melodies", - "A Forest of False Idols", - "Erased from Memory", - "Ancient Doom", - "The Nightmare Awakens", - "The Dreamer's Dream", - "The Dream Trial", - "Hidden Vaal Pathways", - "Echoes of Lost Love", - "Echoes of Witchcraft", - "A Master Seeks Help", - "A Master Seeks Help", - "A Master Seeks Help", - "A Master Seeks Help", - "Bountiful Traps", - "A Master Seeks Help", - "The God of Misfortune", - "Brothers in Arms", - "Echoes of Mutation", - "The Aesthete's Spirit", - "The Undead Brutes", - "The Four Feral Exiles", - "Vaal Winds", - "Fire from the Sky", - "Ice from Above", - "Lightning Falls", - "Crushing Squall", - "The Undead Storm", - "Deadly Twins", - "A Gracious Master", - "The Mentor", - "Overflowing Riches", - "Mysterious Invaders", - "Thaumaturgical History I", - "Thaumaturgical History II", - "Thaumaturgical History III", - "Thaumaturgical History IV", - "Forceful Exorcism", - "The Fall of an Empire", - "The Last Watch", - "The Soulless Beast", - "Custodians of Silence", - "The Prison Guard", - "The Prison Key", - "The Ward's Ward", - "The Lady in Black", - "The Brutal Enforcer", - "Flesh of the Beast", - "Storm on the Horizon", - "The Nest", - "Abnormal Effulgence", - "Fire, Wood and Stone", - "Baptism by Death", - "Fear's Wide Reach", - "Against the Tide", - "From Death Springs Life", - "Weeping Death", - "Storm on the Reef", - "Strong as a Bull", - "Graceful Flames", - "A Whispered Prayer", - "Wind and Thunder", - "The Flayed Man", - "Blood of the Betrayed", - "Defiled in the Sceptre", - "The Sword King's Passion", - "Blood in the Eyes", - "Risen Blood", - "The Eagle's Cry", - "Roth's Legacy", - "The Petrified", - "Notched Flesh", - "The Walking Mountain", - "A Firm Foothold", - "The Sinner's Stone", - "The Lost Undying", - "A Prodigious Hand", - "A Call into the Void", - "The Hollow Pledge", - "Lost in the Pages", - "Cleanser of Sins", - "Heart of the Fire", - "The Vanguard", - "The Watcher's Watcher", - "Plague of Rats", - "Lasting Impressions", - "Kalandra's Craft", - "The Dreaded Rhoa", - "Fated Connections", - "A Regal Death", - "The Mysterious Gift", - "Erasmus' Gift", - "The Brothers of Necromancy", - "An Unseen Peril", - "Waiting in Ambush", - "Sun's Punishment", - "The Ambitious Bandit I", - "The Ambitious Bandit II", - "The Ambitious Bandit III", - "Dance of Steel", - "The Feral Lord I", - "The Feral Lord II", - "The Feral Lord III", - "The Feral Lord IV", - "The Feral Lord V", - "Blind Faith", - "The Great Mind of the North", - "The Great Leader of the North", - "The Plaguemaw I", - "The Plaguemaw II", - "The Plaguemaw III", - "The Plaguemaw IV", - "The Plaguemaw V", - "The Stockkeeper", - "The Storm Spire", - "The Unbreathing Queen I", - "The Unbreathing Queen II", - "The Unbreathing Queen III", - "The Unbreathing Queen IV", - "The Unbreathing Queen V", - "The Warmongers I", - "The Warmongers II", - "The Warmongers III", - "The Warmongers IV", - "The Lost Maps", - "A Rift in Time", - "The Singular Spirit", - "Touched by the Wind", - "Resistant to Change", - "Smothering Tendrils", - "Vital Transformation", - "Golden Touch", - "Holding the Bridge", - "Unbearable Whispers I", - "Unbearable Whispers II", - "Unbearable Whispers III", - "Unbearable Whispers IV", - "Unbearable Whispers V", - "Undead Uprising", - "Living Fires", - "Unnatural Energy", - "In the Grasp of Corruption", - "The Hardened Armour", - "The Beautiful Guide", - "The Sharpened Blade", - "The Corrupt", - "The Forgotten Soldiers", - "Darktongue's Shriek", - "Greed's Folly" -] \ No newline at end of file diff --git a/src/parser/Parser.ts b/src/parser/Parser.ts index d8f09ada..5ec8dc77 100644 --- a/src/parser/Parser.ts +++ b/src/parser/Parser.ts @@ -27,10 +27,13 @@ import { FLASK_CHARGES, PREFIX_BLIGHTED, SECTION_SYNTHESISED, - PREFIX_SYNTHESISED + PREFIX_SYNTHESISED, + PROPHECY_HELP, + BEAST_HELP, + METAMORPH_HELP } from './constants' -import { Prophecies, ItemisedMonsters, BaseTypes } from '@/assets/data' -import { ItemModifier, ModifierType, sectionToStatStrings, tryFindModifier } from './modifiers' +import { BaseTypes } from '@/assets/data' +import { ModifierType, sectionToStatStrings, tryFindModifier } from './modifiers' import { ItemCategory } from './meta' import { ParsedItem } from './ParsedItem' import { magicBasetype } from './magic-name' @@ -53,6 +56,7 @@ interface ParserFn { const parsers: ParserFn[] = [ parseUnidentified, parseSynthesised, + parseCategoryByHelpText, normalizeName, // ----------- parseItemLevel, @@ -131,14 +135,7 @@ function normalizeName (_: string[], item: ParsedItem) { } } - if (Prophecies.has(item.name)) { - item.category = ItemCategory.Prophecy - } else if ( - ItemisedMonsters.has(item.name) || // Unique beast - (item.baseType && ItemisedMonsters.has(item.baseType)) // Rare beast - ) { - item.category = ItemCategory.ItemisedMonster - } else { + if (!item.category) { const baseType = BaseTypes.get(item.baseType || item.name) item.category = baseType?.category item.icon = baseType?.icon @@ -459,3 +456,20 @@ function parseSynthesised (section: string[], item: ParsedItem) { return SECTION_SKIPPED } + +function parseCategoryByHelpText (section: string[], item: ParsedItem) { + if (section.length === 1) { + if (section[0] === PROPHECY_HELP) { + item.category = ItemCategory.Prophecy + return SECTION_PARSED + } else if (section[0] === BEAST_HELP) { + item.category = ItemCategory.CapturedBeast + return SECTION_PARSED + } else if (section[0] === METAMORPH_HELP) { + item.category = ItemCategory.MetamorphSample + return SECTION_PARSED + } + } + + return SECTION_SKIPPED +} diff --git a/src/parser/constants.ts b/src/parser/constants.ts index 0d65ba18..dc52ec11 100644 --- a/src/parser/constants.ts +++ b/src/parser/constants.ts @@ -50,3 +50,7 @@ export const SECTION_SYNTHESISED = 'Synthesised Item' export const PREFIX_SYNTHESISED = 'Synthesised ' export const CLUSTER_JEWEL_GRANT = 'Added Small Passive Skills grant: ' + +export const PROPHECY_HELP = 'Right-click to add this prophecy to your character.' +export const BEAST_HELP = 'Right-click to add this to your bestiary.' +export const METAMORPH_HELP = "Combine this with four other different samples in Tane's Laboratory." diff --git a/src/parser/meta.ts b/src/parser/meta.ts index cbe7e56d..7def243f 100644 --- a/src/parser/meta.ts +++ b/src/parser/meta.ts @@ -1,7 +1,8 @@ export enum ItemCategory { Map = 'Map', Prophecy = 'Prophecy', - ItemisedMonster = 'Itemised Monster', + CapturedBeast = 'Captured Beast', + MetamorphSample = 'Metamorph Sample', Helmet = 'Helmet', BodyArmour = 'Body Armour', Gloves = 'Gloves', @@ -75,3 +76,8 @@ export const ACCESSORY = new Set([ ItemCategory.Ring // ItemCategory.Quiver ]) + +export const ITEMISED_MONSTER = new Set([ + ItemCategory.CapturedBeast, + ItemCategory.MetamorphSample +]) diff --git a/src/web/price-check/CheckedItem.vue b/src/web/price-check/CheckedItem.vue index 935fe0c4..05bda9aa 100644 --- a/src/web/price-check/CheckedItem.vue +++ b/src/web/price-check/CheckedItem.vue @@ -77,7 +77,7 @@ export default { showPredictedPrice () { return this.item.rarity === ItemRarity.Rare && this.item.category !== ItemCategory.Map && - this.item.category !== ItemCategory.ItemisedMonster && + this.item.category !== ItemCategory.CapturedBeast && !(this.item.category === ItemCategory.Jewel && this.item.baseType.endsWith(' Cluster Jewel')) } }, diff --git a/src/web/price-check/filters/FilterName.vue b/src/web/price-check/filters/FilterName.vue index 4a1a8040..47cc9e63 100644 --- a/src/web/price-check/filters/FilterName.vue +++ b/src/web/price-check/filters/FilterName.vue @@ -11,7 +11,8 @@