veiset / poe-vendor-string

Path of Exile Vendor Search tool
61 stars 17 forks source link

Expedition/Gwennen Regex Strings Match Item Implicits in Gambling Window #79

Closed halfacandan closed 1 year ago

halfacandan commented 1 year ago

Hi

Some of the regex strings in the src/generated/GeneratedExpedition.ts file are incorrectly matching implicit modifiers of other base items. I have listed these unintended matches below and proposed new regex strings to avoid the issues.

Many Thanks Dan

Item Current Proposed False Positive Implicit Example Item
aventail helmet nta ntai increased Elemental Damage with Attack Skills Imperial Bow
death bow dea deat chance to deal Double Damage Meatgrinder
dusk blade du dus reduced Enemy Stun Threshold Stone Hammer
heavy arrow quiver y a y ar to Dexterity and Intelligence Turquoise Amulet
occultist's vestment cc occ increased Global Accuracy Rating Dusk Blade
sage wand ge w ge wa increased Elemental Damage with Attack Skills Imperial Bow
secutor helm sec secu Regenerate (2-4) Life per second Coral Amulet
stiletto til stil increased Projectile Speed Feathered Arrow Quiver
supreme spiked shield up upr chance to Suppress Spell Damage Ornate Spiked Shield
tyrant's sekhem ty tyr increased Rarity of Items found Gold Ring
widowsilk robe ws wsi increased Critical Strike Chance with Bows Spike-Point Arrow Quiver
veiset commented 1 year ago

Thank you for a very detailed report of the issue! The regex is auto generated, but as you point out: it's currently missing explicit modifier as an input. I will fix this as soon as possible, but I'm currently out traveling.

veiset commented 1 year ago

Again, thanks! There was a lot of issues caused by this. Under you can find a list of the generated regex when I also made implicits a part of the generator:

I will push this up later (I cant pull the repo on my mobile data connection atm, so I will push the fix the next time I am on wifi).

-   baseType: "Ancient Spirit Shield", regex: "\"nt sp\"",
+   baseType: "Ancient Spirit Shield", regex: "\"nt spi\"",
-   baseType: "Aventail Helmet", regex: "nta",
+   baseType: "Aventail Helmet", regex: "tai",
-   baseType: "Carnal Mitts", regex: "\"l mi\"",
+   baseType: "Carnal Mitts", regex: "\"al mi\"",
-   baseType: "Death Bow", regex: "dea",
+   baseType: "Death Bow", regex: "deat",
-   baseType: "Dusk Blade", regex: "du",
+   baseType: "Dusk Blade", regex: "dus",
-   baseType: "Fencer Helm", regex: "fen",
-   baseType: "Full Dragonscale", regex: "\"ll d\"",
+   baseType: "Full Dragonscale", regex: "\"ull d\"",
-   baseType: "Gladiator Plate", regex: "\"or p\"",
+   baseType: "Gladiator Plate", regex: "\"tor p\"",
-   baseType: "Harlequin Mask", regex: "eq",
+   baseType: "Harlequin Mask", regex: "leq",
-   baseType: "Heavy Arrow Quiver", regex: "\"y a\"",
+   baseType: "Heavy Arrow Quiver", regex: "\"vy a\"",
-   baseType: "Iron Circlet", regex: "\"on c\"",
+   baseType: "Iron Circlet", regex: "\"n ci\"",
-   baseType: "Moonstone Ring", regex: "nst",
+   baseType: "Moonstone Ring", regex: "oons",
-   baseType: "Occultist's Vestment", regex: "cc",
+   baseType: "Occultist's Vestment", regex: "occ",
-   baseType: "Penetrating Arrow Quiver", regex: "pene",
+   baseType: "Penetrating Arrow Quiver", regex: "trati",
-   baseType: "Rustic Sash", regex: "ash",
+   baseType: "Rustic Sash", regex: "usti",
-   baseType: "Sage Wand", regex: "\"ge w\"",
+   baseType: "Sage Wand", regex: "\"ge wa\"",
-   baseType: "Secutor Helm", regex: "sec",
+   baseType: "Secutor Helm", regex: "uto",
-   baseType: "Thresher Claw", regex: "thre",
+   baseType: "Thresher Claw", regex: "eshe",
-   baseType: "Tyrant's Sekhem", regex: "ty",
+   baseType: "Tyrant's Sekhem", regex: "tyr",
-   baseType: "Vaal Regalia", regex: "\"l re\"",
+   baseType: "Vaal Regalia", regex: "\"l reg\"",
veiset commented 1 year ago

It should be fixed and live. Thank you for the report, really appreciate the detail you put in to the bug-report! 💪

Let me know if you find something else.

halfacandan commented 1 year ago

Cool. Thank you for fixing this so quickly @veiset. Looks like your code found some optimisations of the strings which I hadn't considered. Excellent work!