Skip to content

Penetration display, hybrid stats, item recipes, unique attributes - #1

Merged
Linconius merged 2 commits into
mainfrom
claude/relaxed-bardeen-4ffd29
Jun 29, 2026
Merged

Penetration display, hybrid stats, item recipes, unique attributes#1
Linconius merged 2 commits into
mainfrom
claude/relaxed-bardeen-4ffd29

Conversation

@Linconius

Copy link
Copy Markdown
Owner

Summary

Extends the items & stats analysis along four axes the user requested.

  • Penetration in the analysis — Phys/Magic Pen (shown as flat × (1+pct) per type), plus Lifesteal % / Spell Vamp % chart series. Armour (defense) was already shown.
  • Hybrid stats count as bothhybridLifestealPct and new hybridPenetrationFlat/Pct fold into both physical and magical; adaptivePenetration now resolves to one type by hero damageType (was a dead key).
  • Unique attributes — a stats entry may be { value, unique }; same-named flagged grants don't stack across a build (highest wins); plain stats still stack. Backward compatible.
  • Item recipes — builds expand into component purchases along the gold axis, so stats step up as precursors complete, then the combine swaps them for the final item (no double-count). Recipes authored for all recipe-bearing items (mlbbhub source); combine recomputed as total − Σcomponents. validate.ts enforces cost conservation + cycle detection.
  • Penetration data — authored on the ~7 items that grant it (Malefic Roar/Gun share the "Armor Buster" unique passive → don't stack; arcane-boots fixed flat→percent).

Verification

  • npm run validate ✓ (133 heroes, 98 items; conservation + cycle checks)
  • tsc -b ✓, vite build
  • 19 unit tests ✓ (recipe expansion, owned-set transition, hybrid folds, adaptive resolution, unique de-dup, real-data pen)
  • Browser preview ✓ — recipe stepping + pen chart, no console errors

Open follow-up

Display keeps flat × (1+pct); a TODO flags confirming how flat vs % penetration interact in-game (percent-only items read 0 in isolation by design).

🤖 Generated with Claude Code

Linconius and others added 2 commits June 29, 2026 18:32
Items & stats analysis additions:
- Surface penetration (flat x (1+pct) per type) plus lifesteal/spell vamp
  in the stat charts (statDefs).
- Hybrid stats count as both physical and magical: hybridLifestealPct and
  new hybridPenetrationFlat/Pct fold into both sides; adaptivePenetration
  now resolves to one type by hero damageType (was a dead key).
- Unique attributes: a stats entry may be {value, unique} — same-named
  flagged grants do not stack across a build (highest wins); plain stats
  still stack. Backward compatible with numeric entries.
- Item recipes: builds expand into component purchases along the gold axis
  so stats step up as precursors complete, then the combine swaps them for
  the final item (no double-count). Authored recipes for all recipe-bearing
  items from mlbbhub; combine recomputed as total - Sum(components).
  validate.ts now enforces cost conservation + cycle detection.
- Penetration data authored on the ~7 items that grant it (incl. Malefic
  Roar/Gun sharing the "Armor Buster" unique passive; arcane-boots fixed
  from flat to percent). Display keeps flat x (1+pct); pen% interaction
  flagged as a TODO to confirm in-game.

Verified: npm run validate, tsc -b, vite build, 19 unit tests, browser preview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n-4ffd29

# Conflicts:
#	web/src/components/StatChart.tsx
#	web/src/components/statDefs.ts
@Linconius
Linconius merged commit c24d91a into main Jun 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant