Commit graph

8 commits

Author SHA1 Message Date
GaboGG
f993014a46 v0.15.3 - Scorer now accounts for weapon damage, elemental damage, and procs
Parser fix: parseEquipHTML now captures the direct-child divs of the
tooltip that were previously skipped:
  - Proc lines: 'Penetrated Armor: 21.7% chance' -> stats['Proc Penetrated Armor']
  - Base damage: '+708 Piercing Damage' -> stats['Weapon Damage']
  - Elemental lines: '+25 Fire Damage' / '+30 Elec Strike' -> stats['Elemental Fire']

Scorer (gearScoreWeapon + analyze_gear.py):
  - Weapon Damage x 0.30 (base damage matters)
  - Elemental damage x 0.25 per element
  - Proc bonuses by type: CC procs (stun/freeze) x0.45, armor break
    x0.35, DoT x0.25, generic x0.15
  - All multiplied by the same quality multiplier afterward

So an elemental weapon with a strike proc now gets its due — the
short-margin stat winner may no longer win once damage+proc count.
Note: re-scrape the armory/store after updating so the new fields
get captured (old entries lack Weapon Damage/Proc keys).
2026-08-03 16:00:59 -04:00
GaboGG
e935e34ae1 v0.14.41 - Fix gear slot detection: 'gi' was matching inside 'leggings'
Root cause: gearDetectSlot used substring matching. The Body keyword
'gi' (for gi/jacket) appears inside the word 'leggings' (l-e-g-g-i-n-g-s),
so EVERY leggings item was classified as Body:
  - Legs slot showed '(no data)' — its equipped item was mis-detected
  - Body slot showed leggings items as top candidates (176 score)

Fix: word-boundary regex match (\bgi\b) so 'gi' only matches as a
standalone word. Also protects against 'cap' in 'capacity' etc.
2026-07-31 10:59:17 -04:00
GaboGG
641363b5b0 v0.14.40 - Gear panel: armor/weapon filters + fix level detection
- Added filter dropdowns to the panel: Armor (Light/Heavy/Cloth/All)
  and Weapon (2H/Estoc/Longsword/Great Mace/Club/Axe/Scythe).
  Persisted in localStorage. Default: Light armor, 2H weapons.
  Filters exclude non-matching items from armory/buy candidates
  (equipped item always shown regardless).
- Fixed gearPlayerLevel(): now reads STATE.level first (battle
  parser caches it), then the hv-cfg-btn label (Lv195), then
  level_readout. Previously fell back to 155 when the level readout
  used CSS fonts — this excluded the Lv171 equipped Estoc from
  candidates, causing 'vs ?' in the upgrade line.
- Upgrade line now always shows a real number (scores equipped
  directly if it missed candidates).

Also scrapes correctly on equipment pages: clicking Analyze there
refreshes equipped slots from dynjs_equip store.
2026-07-31 10:50:18 -04:00
GaboGG
2f711db66c v0.14.38 - Gear analysis on equipment pages too (ss=eq)
- enhanceGearAnalysis now also fires on Character > Equipment pages
  (id=eqsb), not just Bazaar (equiplist)
- On equipment pages only the Analyze button shows (Rescan hidden —
  no store/inventory data to rescan there, but the localStorage DB
  is still accessible for the comparison)
- Clicking Analyze on ss=eq rescrapes equipped slots + opens panel
  with stored/purchasable comparisons from localStorage
2026-07-31 10:42:39 -04:00
GaboGG
b2e96c6191 v0.14.37 - Fix gear panel: buttons were submitting the armory form
Root cause: both buttons were inserted inside the armory <form>.
HTML <button> defaults to type=submit — clicking submitted the form,
the page reloaded, and the panel (which renders 300ms later) was
destroyed. The split-second flash was the panel before the reload.

Fix: type='button' on both buttons. Panel now stays up.
2026-07-31 09:02:16 -04:00
GaboGG
f3561bb435 v0.14.36 - Add diagnostic logs to gear panel (click, build, render) 2026-07-31 08:57:28 -04:00
GaboGG
217e0cd162 v0.14.35 - Fix gear panel not showing + remove Daily Activities
- Gear panel: wrapped autoScrapeGear() and buildGearPanel() in try/catch.
  An exception during scrape (new store-scan loop) killed the onclick
  handler before the panel was scheduled — panel never appeared.
- Removed renderProgressPanel() call (Daily Activities window) per user
  request — not used.
2026-07-31 07:14:52 -04:00
GaboGG
166539e845 v0.14.33 - In-game gear analysis module
New src/gear-analysis.js — ports analyze_gear.py scoring to JS:
- gearScoreArmor() / gearScoreWeapon() — same weights as Python
- gearDetectSlot() / gearIsTwoHandWeapon() / gearUsable()
- analyzeGear() — scores equipped vs armory vs buy per slot

UI on Armory pages (above equiplist):
- 🔍 Analyze Gear — rescrapes current page, shows per-slot panel
  with top 4 candidates, scores, prices, and upgrade highlights
- 🔄 Clear Buy + Rescan — wipes stale buy data, rescrapes, analyzes

scrapeBuyPage() now also scavenges the full dynjs_eqstore for items
not visible in the current filter tab — one Purchase visit captures
the entire store (429+ items), no need to click through tabs.

Console API: HV.analyzeGear(), HV.gearPanel(), HV.clearBuy()
2026-07-31 07:07:38 -04:00