Penetration display, hybrid stats, item recipes, unique attributes - #1
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the items & stats analysis along four axes the user requested.
flat × (1+pct)per type), plus Lifesteal % / Spell Vamp % chart series. Armour (defense) was already shown.hybridLifestealPctand newhybridPenetrationFlat/Pctfold into both physical and magical;adaptivePenetrationnow resolves to one type by herodamageType(was a dead key).statsentry may be{ value, unique }; same-named flagged grants don't stack across a build (highest wins); plain stats still stack. Backward compatible.combinerecomputed astotal − Σcomponents.validate.tsenforces cost conservation + cycle detection.arcane-bootsfixed flat→percent).Verification
npm run validate✓ (133 heroes, 98 items; conservation + cycle checks)tsc -b✓,vite build✓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