Commit Graph

923 Commits

Author SHA1 Message Date
troytt ac9999cd5b feat(nec): bake missing Necromancer missiles, overlays, and register metadata (M1)
- Update scripts/pack-missiles.ts to include missing Necromancer missiles: corpseexplosion, poisoncorpseexplosion, poisonexplosioncloud, poisonpuff, cursecast, bonecast, bonespeartrail, revive
- Update scripts/pack-overlays.ts to include 15 Necromancer overlays: 10 Curses overhead state icons, 2 hit overlays, 3 Bone Armor overlays
- Extract and bake 32-bit RGBA sprite sheets into public/missiles/ and public/overlays/ with transparent border thresholding (max(r,g,b) <= 4 -> alpha = 0)
- Generate strongly-typed metadata in src/render/missiles-meta.ts and src/render/overlays-meta.ts
- Add comprehensive Vitest test suite in tests/skills/nec/necro-assets.test.ts verifying physical file existence, JSON frame geometry, and 0 transparent border artifacts
- Verified typecheck with 0 errors and all asset test suites passing 100%
2026-09-24 07:04:38 +00:00
troytt 94bc8d78b0 Merge pull request 'fix(waypoint): 修复冰冷之原等 14 处场景小站未渲染缺陷并消除全量跨幕 ID 冲突 (#409)' (#429) from fix/issue-409-waypoint-rendering into main 2026-09-24 06:49:37 +00:00
troytt d5b69548d0 feat(combat): fix kill event lifecycle & single-drop gate (Fixes #404) 2026-09-24 06:16:14 +00:00
troytt 7f2dff56ee feat(combat): fix kill event lifecycle & single-drop gate (Fixes #404) 2026-09-24 06:15:36 +00:00
troytt acdeef7daa fix(waypoint): 修复冰冷之原等14处场景小站未渲染缺陷并消除全量跨幕ID冲突 (#409)
- 在 object-lookup.ts 中导出权威小站判定辅助函数 isWaypointDs1Object 与 isWaypointObjectsTxtId
- 根除 wilderness.ts 中跨幕混淆的 ALL_WAYPOINT_IDS 扁平集合,使用 isWaypointDs1Object 精确识别预设小站
- 修复 maze.ts 中神秘避难所(Level 74)中心房变体被 assignVariants 覆盖重置的问题,确保 SanctNSEW4.ds1 与小站实体完好保留
- 修复 maze.ts 中迷宫房间内部嵌入小站实体的按幕精确识别与坐标统计
- 完善 pack-act-assets.ts,通过 isWaypointObjectsTxtId 识别 Objects.txt 行号 38(WT,ExpansionWildernessWaypoint),消除亚瑞特高原(Level 112)贴图与交互坐标脱节问题
- 在 verify-packs.ts 中新增全量 39 个小站场景 109 个变体的严格 Ground-Truth Invariant 断言(source 必须为 'object' 且 scene.objects 必含渲染实体)
- 新增 tests/waypoint-fidelity-regression.test.ts 专项全量回归测试套件并更新基线哈希

Closes #409
2026-09-24 06:10:49 +00:00
troytt 2d21ed9bcd docs(agents): require isolated git worktree for all changes, merge to main, then clean up 2026-09-24 06:07:28 +00:00
troytt 51acb0effa test(skills): persist M4 fire and M5 cross-tree adversarial stress test suites on main 2026-09-24 04:28:37 +00:00
troytt 2e061b3257 feat(skills): implement Enchant (52) and Fire Mastery (61) with authentic 1.13c parity
- Implement 1.13c Enchant 5-band weapon fire damage progression (HitShift 7, Warmth 9%/blvl synergy)
- Implement Enchant Attack Rating bonus (20% + 9%/slvl) and duration (3600 + 600/slvl frames)
- Implement Fire Mastery passive fire damage bonus (30% + 7%/slvl) in stat-list and combat-pipeline
- Implement authentic Sorceress melee double-dip and ranged 33% weapon fire damage penalty
- Enforce fire immunity preservation (res >= 100% takes 0 fire damage, Fire Mastery cannot pierce)
- Wire Enchant cast skill (52) and overlay animation in act-scene and engine
- Maintain BATCH1_SKILLS invariant strictly at 38
- Add comprehensive 7-dimensional verification suites for Enchant and Fire Mastery (31 tests passing)
- Closes #206, Closes #215
2026-09-24 03:59:47 +00:00
troytt 6aa951e8cc fix(skills): remediate Milestone 3 gate failures for Inferno range and channeled mana drain
- Fix calculateInfernoRangePx to authentic 1.13c ratio: calculateInfernoRange(slvl) * 32 (32 px/subtile).
- Update act-scene.ts flame stream ttl calculation to Math.min(60, Math.round(rangePx / speed)) allowing authentic travel reach.
- Connect continuous channeled mana drain in act-scene.ts: drain (36 + slvl - 1) * 4 / 256 mana per frame with fractional accumulator, stopping channel on mana depletion.
- Update tests/skills/sor/skill-041-inferno.test.ts assertions to 320/752/1232 px and add runtime continuous mana drain tests.
- Persist adversarial stress test suites (adv-fire-m3-math-stress.test.ts and adv-fire-m3-geom-stress.test.ts).
2026-09-24 03:20:48 +00:00
troytt df4c5b66b0 feat(skills): implement Fire Wall, Blaze, and Inferno with 1.13c parity (closes #205, closes #200, closes #195) 2026-09-24 02:46:20 +00:00
troytt 10ef14b5b2 test(skills): persist M2 cold adversarial stress test suites on main 2026-09-24 02:44:18 +00:00
troytt 2ac10a38e3 feat(ui): organize left and right speedbar skill selection by skill tree rows (closes #402)
- Group speedbar skills into dedicated horizontal rows by 1.13c ListRow/SkillPage categories:
  - Row 0: Universal actions (Attack 0, Throw 2, Unsummon 3, Left Hand Throw 4)
  - Rows 1..3: Class skill tree tabs (Tab 1, Tab 2, Tab 3)
  - Row 4: Item and charged skills (Townportal, Identify, charged items)
- Compact unlearned or empty tree rows contiguously without blank spacing
- Enforce strict 1.13c left-click filtering (83 active leftskill=1 skills; 26 passives and all auras excluded)
- Orient left popup upward-rightward and right popup upward-leftward with 800x600 canvas clamping
- Sort intra-row skills by reqlevel ascending then skillId ascending
- Add comprehensive 7-class parity test suite covering grouping, compaction, filtering, and geometry
2026-09-24 02:44:09 +00:00
troytt 375f3296f9 feat(skills): implement Ice Blast, Glacial Spike, and Cold Mastery with 1.13c parity (closes #199, closes #209, closes #219) 2026-09-24 01:43:59 +00:00
troytt 2d6bbb93a2 fix(sor-cold): remediate number overload contract and wire reactive combat hooks (Issue #194, #204, #214)
- Fix calculateShiverArmorDamage and calculateChillingArmorDamage number overload to treat number as allocated synergy points (synPoints) with 1.13c percentage scaling, supporting explicit options.synMultiplier override
- Guard duration and chill/freeze length calculators against negative synergy inputs with Math.max(0, synPoints)
- Wire reactive combat hooks in combat.ts (tickMonsters/updateMonsters and hitPlayerWithMissile):
  * Frozen Armor: reactively freezes attacking monster upon taking physical melee damage
  * Shiver Armor: proactively chills and damages attacking monster upon melee attack initiation
  * Chilling Armor: reflects retaliatory chillingarmorbolt on incoming ranged missiles with returnFire=false
- Wire proactive and reactive combat events in combat-pipeline.ts (executeSUnitDmg):
  * Dispatches attackedinmelee proactively before hit resolution
  * Dispatches damagedinmelee post-damage on melee hits
  * Dispatches hitbymissile post-damage on missile hits
  * Exposes attackerStatesApplied, attackerColdDamage256, reflectedPhys256, and spawnedMissiles on SUnitDmgOutcome
- Add comprehensive remediation test suite tests/skills/sor/cold-armors-remediation.test.ts
2026-09-24 01:06:25 +00:00
troytt e7d105dce0 feat(skills): implement Frozen Armor, Shiver Armor, and Chilling Armor with 1.13c parity (closes #194, closes #204, closes #214) 2026-09-24 00:29:57 +00:00
troytt 617fdfec51 test(skills): persist M3 and M4 adversarial stress test suites on main 2026-09-23 21:00:53 +00:00
troytt a0567c2473 feat(skills): implement Thunder Storm, Energy Shield, and Lightning Mastery with 1.13c parity (closes #211, closes #212, closes #217)
- Thunder Storm (57):
  * Authentic 1.13c duration: 800 + (slvl - 1) * 200 frames (Param1=800, Param2=200).
  * Hyperbolic cadence decay: Math.max(25, 125 - Math.floor((110 * slvl) / (slvl + 6))) frames.
  * Range: 17 subtiles = 340px (Param7=17).
  * 5-band piecewise lightning damage (1-100 base, +10/+10/+11 across bands).
  * Authentic missile 'thunderstorm1' (ID 166, CelFile 'LightningboltBig', animLen 8) and cast overlay 'light_cast_2'.
  * Zero synergies in 1.13c; multiplicative scaling with Lightning Mastery.

- Energy Shield (58):
  * Authentic duration: 3600 + (slvl - 1) * 1500 frames (Param1=3600, Param2=1500).
  * 1.13c piecewise absorb percentage: 20% lvl 1, +5% lvl 2-8, +2% lvl 9-16, +1% lvl 17+, strictly hard capped at 95% (slvl 40).
  * Telekinesis hard synergy ratio: (32 - Math.min(20, Math.max(0, tkBlvl))) / 16 (2.0 down to 0.75). Hard points only (blvl); soft points ignored.
  * Absorbs raw incoming damage BEFORE player resistances are applied. Remainder mitigated by player resistances.
  * Poison (elemType === 'pois' || isPoison) and Open Wounds strictly bypass ES directly to HP.
  * Mana depletion drains mana to 0, collapses shield, and spills unabsorbed damage to HP.
  * Overlays: 'energyshield' looping body overlay and 'energyshieldhit0' directional hit overlay.

- Lightning Mastery (63):
  * Passive formula: 50 + (slvl - 1) * 12 percent (+50% at lvl 1, +62% at lvl 2, +158% at lvl 10, +278% at lvl 20, +518% at lvl 40).
  * Multiplicative scaling with synergies across all 5 lightning skills (Charged Bolt, Lightning, Chain Lightning, Nova, Thunder Storm): Final = Math.floor(Base * (1 + Syn/100) * (1 + Mastery/100)).
  * StatList accrued stat 'passive_ltng_mastery' integration and combat pipeline executeSUnitDmg support.

- 7-Dimensional Vitest Suites:
  * Full 7-D coverage for skill-057-thunder-storm.test.ts (15 tests passing).
  * Full 7-D coverage for skill-058-energy-shield.test.ts (15 tests passing).
  * Full 7-D coverage for skill-063-lightning-mastery.test.ts (17 tests passing).
  * Invariants: BATCH1_SKILLS length strictly 38, zero runtime MPQ queries.
  * Full repo test suite passing (414 test files, 4213 tests passing, 0 errors).
2026-09-23 20:33:24 +00:00
troytt 728d641646 feat(skills): implement Charged Bolt (38) and Telekinesis (43) with 1.13c parity (#192, #197)
- Fix double-append bug in src/game/engine.ts lines 446-449
- Implement Charged Bolt (38) kinematics, NextDelay 0, 5-band damage, 32-entry discrete orthogonal jitter, and +6% Lightning synergy
- Implement Telekinesis (43) 600px range, remote object triggering, ground item pickup whitelist, 1-2 damage, 35% knockback, 35 stun ticks, and Energy Shield hard synergy
- Add comprehensive 7-Dimensional test suites for Charged Bolt (38) and Telekinesis (43)
- Verify 100% pass across all 4,175 unit tests and clean typecheck
2026-09-23 19:30:47 +00:00
troytt 6fefc684ef feat(skills): implement Sorceress Lightning (49) & Chain Lightning (53) with 1.13c parity (closes #203, closes #207)
- Implement 1.13c piecewise 5-band damage and +8%/+4% synergies for Lightning and Chain Lightning
- Implement authentic missile kinematics, NextDelay 4, ping-pong retargeting excluding immediate victim, and infinite beam piercing
- Wire casting overlays, 0 frame cooldown, and 1.13c mana formulas in missile-engine.ts, skills.ts, and act-scene.ts
- Add comprehensive 7-dimensional verification test suites in tests/skills/sor/ (40/40 passing)
- Full repo test suite passing: 4,140 passed, 0 failed, 0 typecheck errors
2026-09-23 18:24:28 +00:00
troytt 0e0cd3adee feat(skills): harden 1.13c Nova and Static Field against adversarial probes (fixes #196, #202)
- Fix ghost property resistLightning to respect monster resistances and lightningResist in act-scene.ts
- Wire monster resistances across MonsterStats and applyEliteModifiers in combat.ts and monsters.ts
- Clamp Static Field damage non-lethally post-resistance scaling and protect against difficulty floor underflow in missile-engine.ts
- Implement continuous sub-step collision and raycast line-of-sight in missile-engine.ts and skills.ts
- Add persistent NextDelay tracking on GameEngine with automatic per-tick expired entry pruning
- Align Nova (64 bolts, aspect ratio 0.5, NextDelay 4) and Static Field in executeSkillCore113c
2026-09-23 17:14:53 +00:00
troytt 35b926749e feat(skills): implement 1.13c Nova and Static Field with 7-D test verification (fixes #196, #202) 2026-09-23 16:27:57 +00:00
troytt 72b9f9e7ec feat(assets): bake 9 missing missile and 9 overlay DCC sprite atlases with dark border thresholding (Milestone M0) 2026-09-23 15:11:21 +00:00
troytt c2e4c5b067 Merge branch 'feat/refactor-transparency' 2026-09-23 14:30:19 +00:00
troytt a8295c265d feat(render): refactor transparency and blend modes for light beams and monsters 2026-09-23 14:29:50 +00:00
troytt 3349bb7628 fix(skills): restore BATCH1_SKILLS catalog to 38 skills and decouple Hydra damage evaluation 2026-09-23 13:29:26 +00:00
troytt c944a77a58 fix(skills): scope isAirborne wall bypass strictly to falling meteor and tail 2026-09-23 13:19:14 +00:00
troytt 84c7730382 fix(skills): implement falling meteor dual sprite trajectory, frame indexing, exact tick-60 detonation, and wall collision
- Dual sprite falling trajectory: render falling meteor fireball (meteor) and flame tail (meteortail) descending diagonally during 60-tick countdown with additive blending
- Animation frame indexing: meteorcenter advances monotonically starting at frame 0, meteorfire plays emergence once (0..11) then loops 12..36 indefinitely
- Detonation timing: center expires and detonates at tick 60 exact (isExpired when ttl <= 1)
- Wall collision: drop meteorfire ground patches landing inside solid walls in MissileEngine
- Full test coverage: Dimensions 8 & 9 added to skill-056-meteor.test.ts, stress and adversarial test suites verified
2026-09-23 13:06:24 +00:00
troytt 96eee679b4 feat(skills): implement Skill #056 Meteor with 1.13c ground truth parity (Ref #401) 2026-09-23 12:36:17 +00:00
troytt 39de19364f fix(skills): route Blizzard damage calculation, eliminate shard silent fallback, and correct blizzardexplode3 celFile (Ref #400) 2026-09-23 11:35:28 +00:00
troytt adaef0d222 test(skills): add comprehensive Blizzard missile physics stress verification suite (Ref #400) 2026-09-23 11:35:28 +00:00
troytt ddad686654 feat(skills): implement Blizzard (Skill 59) with 1.13c parity and baked missile assets (Ref #400)
- Add authoritative 64-entry circle lookup table (BLIZZARD_CIRCLE_X, BLIZZARD_CIRCLE_Y) matching D2Game.dll 0x6FD1C960 with 2:1 isometric projection (ISO_GROUND_ASPECT_RATIO = 0.5)
- Pack authentic DCC missile sprites (blizzard1..3, blizzardexplode1..2, blizzard4 alias, blizzardexplode3 alias) from d2data.mpq into public/missiles/ and export metadata in missiles-meta.ts
- Implement 1.13c simulation in skills.ts and missile-engine.ts:
  * Controller missile 158 blizzardcenter: 100 ticks lifetime, emits 1 falling shard every 4 ticks (Param3=4), coprime step 13 mod 64, radius 7 subtiles
  * Falling shards (blizzard1..4): 9 ticks range, vertical screen altitude descent from 120 px to 0 px
  * Impact explosions (blizzardexplode1..3): 6 ticks duration, cold damage, 100 ticks chill, NextDelay = 0
  * Authentic 5-band level scaling [15, 30, 45, 55, 65] and +5%/pt synergies
- Integrate Blizzard casting in act-scene.ts: spawn blizzardcenter, handle altitude offset, aliased art fallback, and ice_cast_3 overlay
- Add comprehensive 10-case verification test suite (tests/blizzard-missile-113c.test.ts)
2026-09-23 11:35:28 +00:00
troytt 6f9b2e7fb1 docs(skills): add frozen orb skill development guide 2026-09-23 10:33:46 +00:00
troytt 2b6b6d7fd5 feat(skills): full 33 Paladin aura visual overlays & offline UI atlases parity (Fixes #397)
- Implement all 33 Paladin aura overlay targets (13 front/back pairs + 7 full rings) with authentic 1.13c Overlay.txt definitions
- Update offline overlay baking script scripts/pack-overlays.ts and generated metadata src/render/overlays-meta.ts with zero runtime MPQ parsing
- Align baked UI atlases and manifest in public/ui/ and src/ui/baked-ui-meta.ts
- Expand tests/skills/aura-target-parity.test.ts to 7 dimensions including 3D Isometric Aura Ring Sandwich depth layering
- Fix hero class walk offset assertion in tests/hero-classes-art.test.ts
- Add set item icon dye tests in tests/set-items-icons-dye.test.ts
2026-09-23 10:33:34 +00:00
troytt 39c25dfe6f fix(skills): eliminate idle hydra turret inward crossfire self-targeting (Ref #399)
- Remove targetX and targetY from stationary turret projectile definition in castSkill (act-scene.ts)
- Remove idle fallback to projectile.targetX/Y in tickProjectiles (skills.ts) so turrets only fire when an alive target is found within range
- Add negative unit test in Dimension 3 verifying 0 projectiles are spawned over 50 ticks with empty targets array
2026-09-23 09:58:57 +00:00
troytt ebaa1b4df2 feat(skills): implement Hydra (Skill 62) with 1.13c parity and visual assets (Ref #399) 2026-09-23 09:58:57 +00:00
troytt ef2dbcdbdf feat(pipeline): multi-worker concurrency architecture for entity animation packing (Fixes #396) 2026-09-23 09:55:05 +00:00
troytt 806bc9c8bc test(render): tighten assertions and add anti-drift/edge-case tests for Issue #398 2026-09-23 09:25:08 +00:00
troytt e5a34af708 feat(skills): implement Diablo II v1.13c aura skills system with town/wilderness target filtering and visual parity (Fixes #397)
- Implement all 20 Paladin auras (offensive & defensive) with 1.13c MPQ parameters
- Town vs Wilderness filtering: friendly auras buff only self in town, broadcast to allies/mercenaries/summons in wilderness; offensive pulses and redemption suspended in town
- Conviction (#123) asymmetry: caster ring visual only with 0 self debuffs; wilderness enemies receive -Def% and -Res% debuffs with green spikes foot ring; suspended in town
- Holy Freeze (#114) parity: caster displays cyan ring, wilderness enemies take cold pulse damage, item_slow, and blue chill tint with ZERO enemy foot rings
- Offline asset baking: baked 20 aura overlay animations into public/overlays and generated src/render/overlays-meta.ts with zero runtime MPQ parsing
- Full test coverage in tests/skills/aura-target-parity.test.ts passing 6/6 tests and full TypeScript typecheck passing
2026-09-23 09:15:48 +00:00
troytt ce6fdf131e fix(render): animated torches, candles, environmental fires, and DT1 tile sequences (Fixes #398) 2026-09-23 08:58:23 +00:00
troytt c3bb79e403 feat(skills): implement Frozen Orb with 1.13c parity and visual assets 2026-09-23 08:07:47 +00:00
troytt e5c40fa244 fix(inventory): correct Swirling Crystal inventory size to 1x3 and fix Oculus sprite parity
- Correct Swirling Crystal (oba) invWidth from 2 to 1 (1x3) per canonical 1.13c weapons.txt for both The Oculus (STARTER_EQUIPPED_GEAR.weapon1) and Tal Rasha's Lidless Eye (CLASS_EXCLUSIVE_SETS.sor.weapon1)
- Fix The Oculus invFile from invbst (1x4 Battle Staff) to canonical invob5 (1x3 Swirling Crystal sprite)
- Audit all starter item dimensions across all 7 classes against canonical 1.13c weapons.txt, armor.txt, and misc.txt
- Add tests/starter-items-inv-size-parity.test.ts to prevent inventory size regressions
2026-09-23 07:25:25 +00:00
troytt b1479b31ac fix(render): authentic Diablo II v1.13c ground items flippy sprites and clean pickup lifecycle
- Extract and stitch all 213 Blizzard flp*.dc6 resting frames into items-atlas.png
- Support all 4 flpgld gold pile size groups and color dye transforms
- Implement resolveGroundItemSpriteRect() in src/ui/inventory.ts
- Render authentic isometric ground art with contact shadow in drawGroundItem()
- Eliminate synthetic blue boxes, 2D perspective shear hacks, and sparkle white dots
- Fix engine pickup entity matching so picked items are cleanly removed with zero residual dots
- Add tests/ground-items-flippy-parity.test.ts
2026-09-23 07:03:17 +00:00
troytt 807585a615 Merge branch 'issue-393' into main: fix waypoint menu icons parity (#393) 2026-09-23 06:43:24 +00:00
troytt 6cba99f017 fix(ui): waypoint menu icons and click logic 1.13c parity (#393)
- Ground Truth Invariant (D2Client.dll 1.13c at 0x6fb5b2f4-0x6fb5b355 & 0x6fb5a53d):
  - In waygateicons.dc6 (5 frames):
    - Frame 0 (sx=0): Current waypoint unhovered state (blue portal).
    - Frame 1 (sx=30): Current waypoint hovered state (blue portal lit).
    - Frame 3 (sx=90): Activated destination waypoint unhovered state (stone icon).
    - Frame 4 (sx=120): Activated destination waypoint hovered state (stone icon lit).
    - Locked waypoint: Skips sprite draw call completely (je 0x6fb5b355), text drawn in gray.
  - Waypoint click handling:
    - Current waypoint click is a no-op (player already present at location).
    - Locked waypoint click is a no-op.
    - Activated destination waypoint click initiates teleport and closes panel.
- Track current waypoint, current level, and act tab across act-scene and world-panels.
- Update tests in tests/world-panels.test.ts to verify authentic 1.13c behavior.
2026-09-23 06:43:05 +00:00
troytt 263286c0c2 fix(render): isometric grid drop dispersal and authentic ground slanted sprite perspective 2026-09-23 06:23:21 +00:00
troytt 513ad145e8 Merge branch 'issue-386-followup' into main (Fixes #386 follow-up, tracks #395) 2026-09-23 06:14:16 +00:00
troytt 15948eb896 fix(skills): remove translucent solid light boxes during cast overlay animation (#386, #395) 2026-09-23 06:14:11 +00:00
troytt 88bb16238d fix(render): remove duplicate blendMode declaration and add mock activeTexture 2026-09-23 05:56:33 +00:00
troytt da24f9944f Merge branch 'issue-386' into main (Fixes #386) 2026-09-23 05:54:15 +00:00
troytt e3ab3d8552 test: align renderer mock calls in missile-skills test 2026-09-23 05:49:34 +00:00