Commit Graph

879 Commits

Author SHA1 Message Date
troytt 98210321da feat(bar): Milestone M16 Barbarian asset pipeline and foundation
- Extracted and baked authentic Diablo II v1.13c missile DCC sprites from MPQ archives:
  * BAYellShockWave01 (Howl, Shout, Battle Cry, Battle Command, Battle Orders)
  * WarcryShockwave (War Cry)
  * GrimWardSmallStart, GrimWardSmall, GrimWardSmallStop
  * GrimWardMediumStart, GrimWardMedium, GrimWardMediumStop
  * GrimWardLargeStart, GrimWardLarge, GrimWardLargeStop
- Extracted and baked authentic v1.13c overlay DCC sprites with Trans=3 additive blending:
  * ShoutStart, Shout, BattleCry, BattleOrdersStart, BattleOrders
  * BattleCommandStart, BattleCommand, BerserkOverlay, Frenzy, WarcryHit
- Added aliases for Taunt (CurseConfuseEffect) and Stun (Stun)
- Generated typed metadata in src/render/missiles-meta.ts and src/render/overlays-meta.ts
- Added comprehensive unit and adversarial test suites:
  * tests/skills/bar/bar-assets.test.ts
  * tests/skills/bar/adv-bar-assets-audit.test.ts
- Passed 38/38 test files (196/196 tests green, 0 typecheck errors)
- Preserved BATCH1_SKILLS length = 38 and zero runtime MPQ invariant

Closes #463
2026-09-25 01:46:57 +00:00
troytt 143383b93c feat(skills): add Amazon class gate and full E2E verification suite (closes #462)
- Add adv-ama-e2e-gate.test.ts covering all 30 Amazon skills (IDs 6–35)
- Verify cross-tree synergies (Guided Arrow + Pierce + Critical Strike, Lightning Fury + Pierce cascades, Valkyrie + Decoy)
- Validate crowd control mechanics (Slow Missiles velocity dampening, Inner Sight flat defense reduction)
- Verify Fend multi-target thrash & 1.13c Dodge/Avoid/Evade evasion interrupt bug handling
- Verify casting delays (Poison Javelin 12f, Plague Javelin 100f, Immolation Arrow 25f, Valkyrie 150f)
- 36/36 Amazon test files passing (182/182 tests green), typecheck clean, 0 regressions
2026-09-25 01:29:04 +00:00
troytt 8ba4908572 feat(skills): implement Amazon Javelin and Spear skill tree with 1.13c parity (closes #461)
- Implement 10 Javelin & Spear skills: Jab (10), Power Strike (14), Poison Javelin (15), Impale (19), Lightning Bolt (20), Charged Strike (24), Plague Javelin (25), Fend (30), Lightning Strike (34), Lightning Fury (35)
- Wire 1.13c 5-band scaling, synergy matrices, mana curves, casting delays (Poison Javelin 12f, Plague Javelin 100f)
- Add comprehensive adversarial stress test suite adv-ama-javelin-spear-stress.test.ts (13/13 passing)
- Maintain BATCH1_SKILLS length = 38 invariant and zero runtime MPQ reads
- 100% typecheck clean and 0 regressions against existing test suite
2026-09-25 01:24:22 +00:00
troytt 3e4350e50d fix(ama): safely dereference owner stateBus in slow missiles tick (#460) 2026-09-24 20:19:29 +00:00
troytt 1e5b02f0d6 feat(ama): implement Milestone M13 Amazon Passive and Magic skills tree (#460) 2026-09-24 20:10:40 +00:00
troytt 52b0bbaf2b fix(ama): isolate guided arrow maxTurn clamp and align magic arrow weaponless damage (#459) 2026-09-24 19:19:25 +00:00
troytt 88c57f7ed6 feat(ama): implement Milestone M12 Amazon Bow and Crossbow skills tree (#459) 2026-09-24 19:08:16 +00:00
troytt e3f03b255e fix(ama): update baseline entity count and explodingarrowexp test expectations (#458) 2026-09-24 18:23:28 +00:00
troytt e6b3c5b06d feat(ama): implement Milestone M11 Amazon assets, animations & foundation setup (#458) 2026-09-24 18:07:04 +00:00
troytt 7b1a1de8c0 fix(necro): resolve 7 pre-existing 1.13c parity test regressions (#453) 2026-09-24 17:32:34 +00:00
troytt b2b8a270b4 fix(test): align test expectations and monster max resistance with 1.13c parity 2026-09-24 17:30:38 +00:00
troytt 4e79c4731d feat(pal): implement Milestone M10 Paladin Gate and full class E2E verification suite 2026-09-24 17:22:01 +00:00
troytt a88b02ae33 test: fix 29 pre-existing vitest failures and ensure test hygiene (Fixes #451) 2026-09-24 17:15:59 +00:00
troytt cc994fe3c8 fix(skill): fix Fire Ball explosion missile asset and 80px AoE radius (Fixes #440) 2026-09-24 16:54:28 +00:00
troytt f107d05dd2 fix(skill): fix Fire Wall collision indexing and implement SubLoop flame animation (Fixes #439) 2026-09-24 16:28:29 +00:00
troytt ebea702572 fix(skill): change Enchant cast overlay to authentic one-shot playback (Fixes #438) 2026-09-24 16:22:05 +00:00
troytt f12fd5674a fix(skill): extend Meteor ground fire duration and add extinction decay animation (Fixes #437) 2026-09-24 16:17:38 +00:00
troytt 0aa7c0a121 fix(skill): implement Hydra summon cap and authentic entity visuals (Fixes #436) 2026-09-24 16:10:44 +00:00
troytt 1a5f897cd6 feat(pal): implement Milestone M9 Paladin Defensive Auras tree (10 skills) 2026-09-24 16:05:44 +00:00
troytt f2b78c80de fix(test): use missileType in charged bolt kinematics test 2026-09-24 16:02:45 +00:00
troytt 4937f75131 test(missile): clean typecheck error in charged bolt kinematics test 2026-09-24 15:58:24 +00:00
troytt e33738d394 fix(missile): implement authentic Charged Bolt snake-like random walk kinematics (Fixes #435) 2026-09-24 15:55:57 +00:00
troytt d421a4549c test(audit): use authentic combat and drop pipeline in browser verification (Fixes #449) 2026-09-24 15:28:03 +00:00
troytt a3f5013481 fix(skill): restore Lightning and Chain Lightning continuous beam and arc visuals (Fixes #434) 2026-09-24 15:12:39 +00:00
troytt 6f935bccf6 feat(debug): add monster density and elite chance selectors to acts.html (Fixes #450) 2026-09-24 14:50:27 +00:00
troytt ff2d091254 feat(paladin): implement Milestone M8 Paladin Offensive Auras tree
- Implement 1.13c exact calculators for all 10 Paladin Offensive Auras in skills.ts:
  - Might (98): Party physical %ED (40% + 10%/lvl)
  - Holy Fire (102): Radial fire pulse + weapon added fire damage, Resist Fire (+18%) and Salvation (+6%) synergies
  - Thorns (103): Melee physical reflection (250% + 40%/lvl), physical resistance mitigation, PvP 1/4th penalty
  - Blessed Aim (108): Active party %AR, +5% passive AR per hard point even when inactive
  - Concentration (113): Party %ED, 20% uninterrupted attack chance, +50% Blessed Hammer synergy
  - Holy Freeze (114): Continuous enemy slow (25%..54%), CBF bypass, cold pulse + weapon cold damage, synergies
  - Holy Shock (118): Radial lightning pulse (1..max), weapon lightning damage, Resist Lightning (+12%) and Salvation (+4%) synergies
  - Sanctuary (119): Radial magic pulse + knockback vs Undead, sets Undead physical resistance to 0%, %ED vs Undead
  - Fanaticism (122): Caster IAS, %AR, asymmetric caster %ED vs ally %ED (strictly half)
  - Conviction (123): Enemy defense % and elemental resistance reduction (-30%..-150%), 1/5th immunity breaking (-6%..-30%), zero impact on Poison/Magic, caster immunity
- Engine integrations:
  - stat-list.ts: Blessed Aim passive AR (blvl * 5%)
  - combat-pipeline.ts: Sanctuary Undead phys res zeroing, Thorns PvP reflection, Fanaticism caster/ally split, Concentration uninterrupted chance, added weapon elemental damage
  - state-bus.ts: Thorns melee reflection trigger
  - aura-scanner.ts: 50-tick cadence in 2:1 isometric ground space
  - per-skill modules: re-export calculators for skills 98-123
- Add comprehensive test suites:
  - tests/skills/pal/offensive-auras.test.ts (21 tests)
  - tests/skills/pal/adv-pal-auras-stress.test.ts (5 adversarial scenarios)
- Preserve BATCH1_SKILLS length invariant strictly at 38 skills
2026-09-24 14:34:31 +00:00
troytt 967a545116 fix(skill): implement Thunder Storm ambient aura and sky strike (Fixes #433) 2026-09-24 14:29:45 +00:00
troytt a7110143fc fix(monsters): enforce 1.13c champion [2,4] and unique [3,6] minion pack sizes (Fixes #448) 2026-09-24 14:01:16 +00:00
troytt d9ad6df63f fix(skill): preserve buff visual persistence and enforce armor mutual exclusion (Fixes #432) 2026-09-24 13:55:10 +00:00
troytt bafa83df55 fix(paladin): resolve F1-F4 reviewer findings and combat-pipeline regressions 2026-09-24 13:42:00 +00:00
troytt 48183d3b82 feat(paladin): implement Milestone M7 Paladin Combat Skills Tree (10 skills) 2026-09-24 13:42:00 +00:00
troytt 62f4b4172e fix(monsters): align monster density and champion/unique elite generation with 1.13c Levels.txt (Fixes #448) 2026-09-24 13:26:34 +00:00
troytt 0e70ad1662 fix(skill): implement Frost Nova 64-missile radial spread and slow (Fixes #431) 2026-09-24 13:18:31 +00:00
troytt e3a7918a16 fix(ground): hover ground item reveals label & fix grand charm flippy sprite (Fixes #447, Fixes #452)
- Hover ground item icon reveals authentic name label without needing Alt key (Fixes #447)
- Connect SceneMouseController pointermove/pointerleave with GroundLabelOverlay hover callback and ladder layout rendering
- Correct Grand Charm (cm3) and Gheed's Fortune ground flippy sprite mapping to flpchm3 (Fixes #452)
- Correct Small Charm (cm1) and Large Charm (cm2) default flippy mappings to flpchm1 and flpchm2
- Add 1.13c charm ground flippy resolution tier and Chinese semantic fallbacks in resolveGroundItemSpriteRect
- Add comprehensive vitest suites in tests/charm-ground-flippy-parity.test.ts and tests/ground-items-alt-labels.test.ts
2026-09-24 13:06:15 +00:00
troytt af2671c14a fix(ground): resolve monster-drop ground sprites from padded .d2s item codes
Pipeline-built Items carry code as the 4-byte space-padded .d2s field
('dr3 '), so the codeToFlippyFile lookup missed and every drop fell through
to the inventory-size guess (2x2 -> invbox, the Horadric Cube). Picking the
item up rebuilt it via itemToUiInventoryItem, which is why re-dropping
looked correct. Normalize the code (trim, fall back to base.id) in both
resolveItemSpriteRect and resolveGroundItemSpriteRect.

Adds tests/ground-drop-sprite.test.ts: raw-drop sprite == post-pickup sprite
for 400 Act 1 Champ A rolls, and every droppable base with a baked flippy
resolves to it directly.
2026-09-24 12:30:30 +00:00
troytt 71466df5e7 fix(skill): implement Glacial Spike explosion and 64px AoE freeze (Fixes #430) 2026-09-24 12:23:39 +00:00
troytt 0aa6c3680d feat(paladin): Milestone M6 — 1.13c Paladin assets packaging & metadata registry
- Update scripts/pack-missiles.ts with Paladin missiles (fistoftheheavensbolt, foa, blessedhammerex, blood1) with trans: 1 and dark border suppression max(r,g,b) <= 4 -> alpha = 0.
- Update scripts/pack-overlays.ts with 16 Paladin combat, cast, hit, and state overlays (charge, conversion, conversioncast, holy_bolt_cast, fist_of_the_heavens_cast, handofgod, sanctuary_knockback, holy_fire_hit, holy_fire_indicate, thorns_hit, thorns_indicate, cast_resistfire, cast_resistcold, cast_resistlight, cast_resistall, stun) with preDraw flags and trans: 3 dark halo thresholding.
- Bake and mirror assets across public/ and samples/d2-packs/.
- Generate compile-time metadata in src/render/missiles-meta.ts and src/render/overlays-meta.ts with zero runtime MPQ invariant.
- Add comprehensive unit tests in tests/skills/pal/pal-assets.test.ts.
- Add adversarial coverage audit tests in tests/skills/pal/adv-pal-assets-audit.test.ts.
- Resolves Gitea issue #445.
2026-09-24 11:30:34 +00:00
troytt ef86fc55f3 test(drop): end-to-end deterministic drop tests and headless browser audit (Fixes #408) 2026-09-24 11:13:35 +00:00
troytt a19ded4c7b Merge branch 'fix/cave-darkness-tuning' 2026-09-24 10:46:43 +00:00
troytt c079ea4cb4 fix(lighting): calibrate isometric sub-tile torch radii and cave quadratic falloff 2026-09-24 10:46:30 +00:00
troytt de5530f1fe feat(necro): implement Milestone M4 Necromancer Summoning Spells Tree (10 skills)
- Implement core 1.13c summoning formulas and invariants:
  - Skeleton Mastery (69): passive flat HP (+8/lvl), flat damage (+2/lvl), revive HP % (+5%/lvl), damage % (+10%/lvl), defense (+10/lvl).
  - Raise Skeleton (70): max count formula ((slvl < 4) ? slvl : 2 + floor(slvl/3)), corpse requirement.
  - Clay Golem (75): Golem Group 3 exclusivity, slow-on-hit effect against targets and melee attackers, synergy from Blood Golem.
  - Golem Mastery (79): passive HP % (20% + 25%/lvl) and diminishing run/walk speed bonuses.
  - Raise Skeletal Mage (80): max count formula matching warriors, 4 elemental types, ranged elemental missile firing.
  - Blood Golem (85): 70% life link healing on damage dealt, damage sharing with player.
  - Summon Resist (89): diminishing passive elemental & poison resistances (dm12(20, 75)) capped at 75%.
  - Iron Golem (90): consumes metallic weapon/armor item from ground, inherits base damage/defense/auras, innate Thorns reflection (150% + 15%/lvl).
  - Fire Golem (94): Holy Fire pulse aura every 50 ticks, 100% fire absorption healing, Fire Nova death explosion.
  - Revive (95): max count = slvl, copies target monster stats with +200% HP and +215% damage, 180s (4500 frames) lifespan timer.
- Integrate with SummonManager, CombatPipeline, and ActScene:
  - Group 3 Golem mutual exclusivity (Clay, Blood, Iron, Fire).
  - Synchronous corpse consumption (non-boss corpses only).
  - Fire Golem 100% fire damage absorption to health.
  - Clay Golem attacker in melee slow debuff.
  - Iron Golem Thorns physical melee reflection.
  - Blood Golem life link healing to player.
  - Preserve BATCH1_SKILLS length invariant (strictly 38).
  - Enforce 2:1 isometric ground geometry (ISO_GROUND_ASPECT_RATIO = 0.5).
- Add comprehensive verification test suites:
  - tests/skills/nec/summoning.test.ts (unit tests for all 10 summoning skills)
  - tests/skills/nec/adv-summoning-stress.test.ts (stress & boundary tests)
2026-09-24 10:38:37 +00:00
troytt b5754c0197 feat(ui): drop item to ui inventory item bridge, bilingual tooltip, and pickup loop (Fixes #407) 2026-09-24 10:36:23 +00:00
troytt 5079f364ec feat(ui): add interactive scene lighting selector (#lighting) after variant selector in acts.html
- Add <select id="lighting"> in acts.html right after #variant with 9 lighting modes:
  * auto: 自动 (原版 1.13c)
  * noon: 正午 (明亮日光)
  * morning: 清晨 (晨曦暖金)
  * sunset: 黄昏 (暮色紫金)
  * night: 午夜 (幽暗蓝月)
  * cave: 深渊地牢 (火炬暗黑)
  * hell: 地狱血月 (第四幕猩红)
  * eclipse: 蚀日之咒 (幽蓝暗蚀)
  * off: 关闭光照 (全亮无光影)
- Wire real-time zero-reload switching via switchLighting() in act-scene.ts and sync URL ?lighting= query param
2026-09-24 10:20:18 +00:00
troytt cef09dbd81 fix(ground): synchronize act-scene renderStarted with simulation clock domain and guard bounce height 2026-09-24 09:39:10 +00:00
troytt 1568fcbd10 feat(ground): monster loot and gold ground spawning, isometric scatter, and flippy bounce (Fixes #406) 2026-09-24 09:39:09 +00:00
troytt bfc1164d9b feat(necro): implement Milestone M3 Necromancer Curses Tree (10 skills)
- Implement core curse formulas (radius, duration, debuff stats, immunity breaking)
- Enforce 1.13c ground truth invariants:
  * Amplify Damage (-100% phys res, or -20% on immune)
  * Decrepify (-50% phys res / -10% on immune, -50% speed, -50% attack rate, -50% damage dealt)
  * Lower Resist (-dm56% on fire/lightning/cold/poison, 1/5th penalty on immune)
  * Life Tap (50% physical life leech on hit)
  * Iron Maiden (reflects 200%..675% physical melee damage back to attacker)
  * Weaken (-33% damage dealt)
  * Attract (cursetype = 2, immune to overwrite, cannot recast on attracted unit)
  * Mental curse immunity for Bosses & Champions (Dim Vision, Terror, Confuse, Attract)
  * 2:1 isometric radius targeting and overhead animated overlays
- Add primary verification suite (tests/skills/nec/curses.test.ts)
- Add adversarial challenger stress suite (tests/skills/nec/adv-curses-stress.test.ts)
2026-09-24 09:21:30 +00:00
troytt 8a9970aa31 Merge branch 'fix/lighting-visual-artifacts' into main: resolve wall black-hole self-occlusion, clear-color seam, cave torch emitters, and vertical UV shift 2026-09-24 09:16:28 +00:00
troytt 536a712816 fix(lighting): resolve wall black-hole self-occlusion, clear-color seam, torch emitters, and vertical UV shift
- LightGrid Radial Ray-Marching (src/game/engine/light-grid.ts):
  * Only count line-of-sight blockers (COLLIDE_VISIBLE | COLLIDE_DOOR) in updateObstacles
    so floor rocks, stairs, and walkable blockers do not create dark spots.
  * Trace radial rays from emitter to target cell (1 <= s < steps) so the emitter's
    own cell is never self-occluded when hugging a wall, wall front-faces receive full
    illumination, and authentic shadows are cast behind walls.

- Ground-Plane Vertical Elevation Compensation (src/render/renderer.ts):
  * Encode vertical sprite elevation (elevationY) in top quad vertices while strictly
    preserving the 10-float vertex stride (FLOATS_PER_VERTEX = 10) so upright walls,
    objects, characters, and monsters sample the lightmap at their ground footprint.

- Scene Lighting & Clear Color Parity (src/scene/act-scene.ts):
  * Set canvas clear color to pure pitch black [0, 0, 0] when lighting is enabled,
    eliminating #08080a diamond void bands around cave boundaries.
  * Scale light radii by SUB_TILES_PER_LIGHT_CELL (8 sub-tiles per cell: player torch 88).
  * Register Objects.txt Lit0..2 emitters (TO, T1, T2, FB, B2, WP, SH, etc.) for cave torches.
  * Map all spell skillIds (including Glacial Spike '55') for dynamic projectile lighting.
2026-09-24 09:14:35 +00:00
troytt 3aae6d164c fix(drops): prevent TC group ascending sub-sequence spillover and restore expansion row for verify:monsters 2026-09-24 08:39:48 +00:00
troytt ebaa22e26d feat(drops): implement monster & superunique treasure class resolution (Fixes #405) 2026-09-24 08:39:48 +00:00