step 10.14: done

This commit is contained in:
bepis
2026-10-23 05:54:46 +11:00
parent 32fb0eee9a
commit 2a79c4ea43
7 changed files with 263 additions and 71 deletions
+4 -4
View File
@@ -95,10 +95,10 @@ Max 2 distinct loot drops per fight.
| Greater Healing Potion | consumable | uncommon | 8 | 60 | effect heal:150 |
| Energy Tonic | consumable | uncommon | 1 | 80 | effect energy:25 |
| Rat Tail | material | common | 1 | 0 | sell 2g |
| Wolf Pelt | material | common | 2 | 0 | sell 5g |
| Spider Silk | material | uncommon | 5 | 0 | sell 12g |
| Imp Horn | material | uncommon | 10 | 0 | sell 30g |
| Drake Scale | material | rare | 14 | 0 | sell 90g |
| Wolf Pelt | material | common | 2 | 0 | sell 4g |
| Spider Silk | material | uncommon | 5 | 0 | sell 20g |
| Imp Horn | material | uncommon | 10 | 0 | sell 40g |
| Drake Scale | material | rare | 14 | 0 | sell 112g |
Materials with `buy_price = 0` sell at: common 2×level, uncommon 4×level, rare 8×level (round down, min 1).
+5
View File
@@ -37,6 +37,11 @@ Format:
- Decision: Each round, both attack; faster first; hero wins speed ties; a kill ends the round.
- Consequences: Round log has up to 2 entries per round (max 40). Win rates need re-tuning (see STATUS issue 1).
## D-022: Material sell prices use item-level formula
- Context: BALANCE.md says materials sell at `common 2×level, uncommon 4×level, rare 8×level` — but "level" was ambiguous (hero level vs item level). The code used `defaultRate * heroLevel / itemMinLevel`, making high-level heroes overpay and low-level heroes underpay for high-level materials.
- Decision: Use `materialSellPrice(rarity, itemMinLevel)` from `src/game/rewards.js` — price depends on the ITEM's level, not the hero's. BALANCE.md table corrected to match the formula (e.g., Drake Scale: 90g → 112g).
- Consequences: Existing shop tests that asserted hero-level prices updated; material sell prices are now consistent regardless of hero level.
## D-005: Equipment stats are counted once in derived stats
- Context: maxHp added equipment VIT twice (once in totalVit, once as a separate term).
- Decision: `calcDerived` in `src/game/stats.js` is the ONLY derived-stat formula; combat and services call it.