Commit Graph

628 Commits

Author SHA1 Message Date
troytt 9c2e3ca81c fix(drop): prevent items and gold from dropping into player-unreachable locations (Fixes #492) 2026-09-27 06:09:02 +00:00
troytt d2358ede37 Merge pull request 'fix(ui): align Private Stash header and gold text inside TradeStash.dc6 recessed boxes (#493)' (#494) from fix/stash-text-align into main
Merge pull request 'fix(ui): align Private Stash header and gold text inside TradeStash.dc6 recessed boxes (#493)' (#494) from fix/stash-text-align into main
2026-09-27 05:55:32 +00:00
troytt 4d023e815f fix(ui): align Private Stash header and gold text inside TradeStash.dc6 recessed boxes (Fixes #493) 2026-09-27 05:54:58 +00:00
troytt f3c500978d fix(ui): 对齐技能树剩余技能点凹槽、移除底部冗余横幅并归位关闭按钮插槽 2026-09-27 05:50:42 +00:00
troytt e9c3b41768 feat(items): spawn magic/rare/set/unique drops unidentified and implement full 1.13c identification 2026-09-27 05:39:21 +00:00
troytt 7295dc8b3e feat(portal): implement v1.13c Town Portal tome/scroll, DS1 town positions & two-way travel (#394)
- Resolve exact Diablo II v1.13c DS1 Type-2 Object #33 (Objects.txt ID 59) Town Portal sub-tiles across all 9 town presets (Acts 1-5) in src/game/portal.ts
- Implement TownPortalSlot.mouthInLevel(levelId) and enterFrom(levelId) per ObjMode.cpp:3245 (wilderness -> town keeps portal open; town -> wilderness closes portal)
- Add 20-charge quantity tracking for Tome of Town Portal (tbk) and Tome of Identify (ibk), right-click casting for tbk/tsc in inventory, and scroll-to-tome refill
- Bake authentic TP DCC sprite atlases (tptrlitophth, tphdlitophth, tptrlitonhth, tphdlitonhth) into public/overlays/town_portal_*
- Render Town Portal entity with OP/ON DCC animation, dynamic blue light (Light=19, RGB 64/110/255), overhead destination label, and proximity walk-to-interact in src/scene/act-scene.ts
- Add unit and parity tests in tests/town-portal.test.ts

Closes #394
2026-09-26 15:11:09 +00:00
troytt 43599963e4 fix(ui): separate left-click move/stack/identify-target from right-click use for tomes, scrolls, and cube (Fixes #487) 2026-09-26 14:17:57 +00:00
troytt bdb3b4145a fix(ui): restore 1.13c buysell.dc6 vendor panel, tabs, and repair buttons 2026-09-26 11:45:37 +00:00
troytt 3b993cf04a feat(vendor): implement 1.13c vendor inventory generator, pricing engine & town NPC UI (Fixes #481, #482, #483, #484, #485, #486) 2026-09-26 05:49:03 +00:00
troytt b7ccc448b4 fix(items): strictly align item names & stat descriptions with 1.13c .tbl across inventory, stash, and ground (fixes #480) 2026-09-26 05:23:09 +00:00
troytt c09e237ff8 fix(drop): unify monster and inventory ground drops on 16x8 sub-tile lattice with bilingual metadata parity
1. Sub-Tile Scatter Spacing (D2Common.dll COLLISION_GetFreeCoordinatesImpl 0x6FD9D140):
   - Unify GameEngine.triggerMonsterDrop, GameEngine.dropItem, GameEngine.dropGold,
     and net-scene monster drops on findIsometricDropPosition (16x8 sub-tile diamond
     lattice, 16px orthogonal / 8px vertical spacing) instead of 80x40px macro cells.
   - Derive GroundItemEntity (cellX, cellY) from final scattered (finalX, finalY)
     via worldToCell rather than overwriting with stale origin cell coordinates.

2. Monster vs. Inventory Drop Metadata & Bilingual Name Parity:
   - Add formatBilingualGroundItemName in src/game/ground-items.ts using
     translateItemName / translateMagicName / translateRareName so raw monster-dropped
     Item objects receive identical '中文名 (English Name)' nameZh as UiInventoryItem.
   - Detect runes via isRuneCode in resolveItemQualityString so monster-dropped runes
     render with #ff9c18 orange labels matching inventory-dropped runes.
   - Preserve flippyFile, dropSound, and dropSfxFrame in itemToUiInventoryItem, fix
     socket count resolution so unsocketed items do not inherit base.gemsockets, and
     add embedded drop table fallback in resolveGroundItemMetadata.

3. Anti-Stacking for Sequential Player Inventory/Body Drops:
   - Simplify act-scene onDropItemToGround / onDropGoldToGround to delegate directly
     to engine.dropItem / engine.dropGold at (player.x, player.y) so every dropped
     item checks engine.groundItems.all and scatters to a unique sub-tile slot.

Fixes #479
2026-09-26 04:51:32 +00:00
troytt 9022579306 feat(drop): overhaul item drop engine for strict 1.13c assembly parity (Fixes #412, #413, #414, #415, #416, #417, #418, #419, #420, #421, #422, #423, #424, #425, #426, #427, #428)
- M1 (#412, #413, #414): Embed canonical DifficultyLevels.txt (RAW_DIFFICULTY_LEVELS), remove DEFAULT_DIFFICULTY_LEVEL_ODDS and synthetic rollDrop dead code, and enforce fail-fast monsterLevel/TC validation in GameEngine.
- M2 (#415, #416, #417, #418): Add 'boss' to MonsterRank (monsterType = 4), enforce Champion (+2) and Unique/Minion/SuperUnique (+3) mlvl modifiers, wire equipped Magic Find with 1.13c diminishing returns, and wire /players N NoDrop scaling.
- M3 (#419, #420, #421, #422): Spawn physical ground gold piles with 3-tier flpgld sprites and 10,000*level inventory capacity, gate drops on DT->DD death animation frame completion, trigger base item dropsound at dropsfxframe via AudioManager, and place drops via collision-grounded quadrant spiral search.
- M4 (#423, #424, #425, #427): Remove procedural colored rectangle fallbacks and verify 100% flippy DC6 coverage, apply #808080 gray ground labels for ethereal/socketed normal & superior items, align pickup bounds to 2-subtile collision reach with 2-pass auto-belt potion slotting, and synchronize multiplayer lockstep drops via monster dwInitSeed.
- M5 (#426, #428): Enforce 6-item drop cap per monster for Countess bonus rune TCs, wire Act Boss quest first-kill TreasureClass4 with save persistence, implement rollHellforgeDrop (1 rune + 4 gems), and complete full-spectrum statistical and 136-level verification.

Fixes #412
Fixes #413
Fixes #414
Fixes #415
Fixes #416
Fixes #417
Fixes #418
Fixes #419
Fixes #420
Fixes #421
Fixes #422
Fixes #423
Fixes #424
Fixes #425
Fixes #426
Fixes #427
Fixes #428
2026-09-25 22:37:17 +00:00
troytt 92966abdee feat(skills): complete 1.13c D2MOO parity for Assassin and Universal skills (#154-#374) 2026-09-25 22:13:38 +00:00
troytt d393a48043 feat(drop): embed MonStats and SuperUniques with 1.13c multi-diff TC parity (Fixes #410, #411)
- Pack and embed authentic 1.13c MonStats drop columns (734 kinds) with noRatio support
- Embed SuperUniques multi-difficulty TCs (66 unique bosses) and fail-fast loading
- Fix SuperUnique minion TC3 inheritance and minion monsterType identification
- Add adversarial drop parity audit and superunique minion test suites
- Update D2MOO oracle seed generator and Paladin skill tree parity
2026-09-25 13:44:35 +00:00
troytt 395f0b22bc feat(drlg): overhaul outdoor wilderness generator with strict D2MOO 1.13c parity (Fixes #455)
- Refactor entire wilderness generation pipeline under src/game/wilderness/
- Implement DRLGOUTPLACE dynamic level connection dimensions and orientation flags
- Align outer river double-column generation (x = nGridWidth - 2) replacing perimeter trees
- Implement authentic 4-pass secondary borders with 52 groups of DS1 substitution patterns
- Align 56x8 TownSTrans gate to river boundary and place all 5 canonical presets
- Replace dual road generators with single-pass orthogonal dirt path rasterizer
- Initialize 0x40002 base floor grass and apply LvlSub.txt SubType 6 clustered replacements
- Add D2MOO native mapgen parity fixtures and comprehensive stress & reachability test suites
2026-09-25 04:48:57 +00:00
troytt 16f2f5ef4a feat(skills): add Milestone M30 All 7 Classes Global Master Parity Gate suite 2026-09-25 04:01:20 +00:00
troytt a70ab93a61 test(skills): implement Assassin Milestone M29 Class Gate & End-to-End Suite (30/30 skills)
- Add adv-ass-e2e-gate.test.ts covering all 8 core cross-tree scenarios:
  1. Traps Tree Synergy Network & 5-Band Progression (LS +720%, DS corpse explosion, Blade weapon scaling 3/8 and 3/4).
  2. Martial Arts Charge-Up & Finisher Discharge Pipeline (multi-skill charges, single-tier Phoenix Strike, Dragon Talon multi-kicks, Dragon Claw dual strikes).
  3. Shadow Disciplines Buff Mechanics & Venom Bitrate Clamp (BoS vs Fade cancellation, Venom 10-frame clamp, CoS recast lockout).
  4. Minion & Summon Caps (5 Traps + 1 Shadow = 6 Max concurrent pets).
  5. NextDelay Collision Avoidance Across Trees (WoF 4f, Shock Web 25f, Dragon Flight 4f).
  6. Cross-Tree Hybrid Build Integration (Trapper / Kicksin / Shadow).
  7. Crowd Control & Status Effects (Mind Blast 4y stun/conversion, Psychic Hammer KB, CoS blind).
  8. Complete 30-Skill Assassin Tree Data Registry & Invariants (IDs 251..280 exist in D2DataRegistry, BATCH1_SKILLS length = 38).
- All 34 Assassin test files pass (166/166 tests passed).
- TypeScript Typecheck (tsc --noEmit) passes with 0 errors.
2026-09-25 03:52:03 +00:00
troytt 8d15aac80f feat(skills): implement Assassin Shadow Disciplines tree with 1.13c parity (Milestone M28)
- Implement Claw Mastery scaling (AR, ED, diminishing returns Critical Strike).
- Implement ShadowBuffTracker for Burst of Speed vs Fade mutual cancellation, duration, and Venom coexistence.
- Implement resolveVenomPoisonClamp for strict 10-frame (0.4s) duration clamp and bitrate summing.
- Implement resolveWeaponBlock with dual-claw requirement and 0% block while running.
- Implement Cloak of Shadows defense debuff/buff, duration, and recast lockout.
- Implement Psychic Hammer 50/50 phys/magic damage and target-rank knockback scaling.
- Implement Mind Blast physical damage, 4-yard AOE stun, and conversion chance with boss/unique immunity.
- Implement ShadowMinionManager for PetType limit = 1, mutual replacement, Warrior mirroring, and Master autonomous slvl scaling.
- Add adv-ass-shadow-stress.test.ts verifying all 7 adversarial test categories (21 tests passed).
- All 10 Shadow Disciplines unit tests (#252, #253, #258, #263, #264, #267, #268, #273, #278, #279) and typecheck pass.
2026-09-25 03:45:44 +00:00
troytt 3e85a8059d feat(skills): implement Assassin Martial Arts tree with 1.13c parity (Milestone M27)
- Implement ChargeOrbManager for 1..3 tier charge accumulation, 375-frame (15.0s) duration, timeout expiration, duration refresh, and multi-skill coexistence.
- Implement resolveFinisherDischarge for full discharge on finisher contact (Tiger Strike ED%, Cobra Strike life/mana steal, Claws of Thunder cumulative elemental tiers, Phoenix Strike single tier payload).
- Implement Dragon Talon multi-kicks (1 + floor(slvl/6)) and AR scaling.
- Implement Dragon Claw dual-claw check, 2 strikes, and Claw Mastery synergy.
- Implement Dragon Tail physical-to-fire conversion (50 + 10*(slvl-1)%), 6 subtiles AOE, and knockback.
- Implement Dragon Flight teleport kick, NextDelay = 4 frames, and ED% scaling.
- Add adv-ass-martial-stress.test.ts verifying all 7 adversarial test categories (16 tests passed).
- All 10 Martial Arts unit tests (#254, #255, #259, #260, #265, #269, #270, #274, #275, #280) and typecheck pass.
2026-09-25 03:38:21 +00:00
troytt 880b196c43 feat(ass): Milestone M26 Assassin Asset Pipeline and Trap Mechanics (closes #473) 2026-09-25 03:30:28 +00:00
troytt 2e65415aed feat(dru): Milestone M25 Druid Class Gate & End-to-End Suite across all 30 skills (closes #472) 2026-09-25 03:11:06 +00:00
troytt 853f61d634 feat(dru): Milestone M24 Druid Summoning skills, pet exclusivity, spirit auras, corpse cycles, and stress suite (closes #471) 2026-09-25 03:06:36 +00:00
troytt 0c5f5a88ab feat(dru): Milestone M23 Druid Shape Shifting skills, form states, charge orbs, contagion, and stress suite (closes #470) 2026-09-25 02:56:20 +00:00
troytt 5eded536ef feat(dru): Milestone M22 Druid elemental skills pure calculators, absorption, kinematics, and stress suite (closes #469) 2026-09-25 02:51:27 +00:00
troytt 51ac3b2d77 feat(dru): Milestone M21 Druid asset pipeline and foundation (closes #468) 2026-09-25 02:35:14 +00:00
troytt 1f14b311c7 feat(bar): Barbarian Class Final Quality Gate & E2E Verification (30/30 Skills)
- Complete E2E verification across all 30 Barbarian skills (IDs 126–155)
- Cross-tree Warcry buff duration network (Shout, Battle Orders, Battle Command)
- Berserk 100% magic conversion & zero-defense vulnerability duration
- Frenzy momentum speed scaling & dual-wield requirements
- Whirlwind uninterruptible path sweeping & 4-frame hit checks
- War Cry 5-band physical damage progression & stun length
- Combat Masteries & Critical Strike sequential roll without 4x stacking
- Refined weapon matching for cryptic axe, poleaxe, and mauls
- Enforces BATCH1_SKILLS length invariant = strictly 38
- Fixes #467
2026-09-25 02:12:47 +00:00
troytt dbd80db251 feat(bar): implement Barbarian Warcries (IDs 130, 131, 137, 138, 142, 146, 149, 150, 154, 155)
- Authoritative 1.13c parity for 10 Barbarian Warcries
- Exact Shout, Battle Orders, Battle Command duration scaling & mutual synergies
- Exact 5-band physical damage progression for War Cry with +6%/blvl synergies
- Authentic Battle Cry defense/damage debuff scaling and duration
- Authentic Taunt forced melee & debuff progression
- Diminishing returns for Find Potion and Find Item
- Grim Ward 1000-frame (40s) totem duration & flee radius scaling
- Adversarial stress tests (slvl 0, 1, 10, 20, 99)
- Enforces BATCH1_SKILLS length invariant = strictly 38
- Fixes #466
2026-09-25 02:07:49 +00:00
troytt 0c3388b18b feat(bar): implement Barbarian Combat Masteries (IDs 127-129, 134-136, 141, 145, 148, 153)
- Authoritative 1.13c parity for 10 Barbarian Combat Masteries
- Exact linear AR, Damage, Stamina, Defense progression
- Exact diminishing returns Critical Strike (dm56), Speed, Resist All (dm12)
- Sequential roll for Critical Strike & Deadly Strike
- Adversarial stress tests (slvl 0, 1, 10, 20, 99)
- Enforces BATCH1_SKILLS length invariant = strictly 38
- Fixes #465
2026-09-25 02:02:04 +00:00
troytt bd4920f3aa feat(bar): implement Barbarian Combat Skills (IDs 126, 132, 133, 139, 140, 143, 144, 147, 151, 152)
- Authoritative 1.13c parity for 10 Barbarian Combat skills
- Exact damage, attack rating, mana, duration, and knockback formulas
- 6-part synergy integration (Bash, Stun, Double Swing, Concentrate, Frenzy, Berserk)
- Adversarial stress tests (slvl 0, 1, 10, 20, 99)
- Enforces BATCH1_SKILLS length invariant = strictly 38
- Fixes #464
2026-09-25 01:56:23 +00:00
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 1e5b02f0d6 feat(ama): implement Milestone M13 Amazon Passive and Magic skills tree (#460) 2026-09-24 20:10:40 +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 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 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
troytt 29a53233a8 fix(necro): remediate challenger findings for Poison & Bone spells
- Fix dagger classification in getAttackWeaponInfo: authentic 1.13c dagger 'Blade' (bld, knif) properly classified as dagger instead of sword
- Prevent runaway recursive sub-missile explosion cascade loops on piercing missiles (Bone Spear, Teeth, Bone Spirit)
- Fix Bone Spirit homing scalar speed doubling on non-horizontal angles (ensure scalar speed is invariant to homing angle)
- Ensure Poison Nova projectile TTL is exactly 50 frames per D2 1.13c standard
- Include adv-pnb-kinematics-stress.test.ts and adv-pnb-synergy-stress.test.ts stress test suites
2026-09-24 08:37:27 +00:00
troytt e070ed404d feat(nec): implement 10 Necromancer Poison and Bone Spells (M2)
- Implement 10 Poison and Bone skills (Teeth 67, Bone Armor 68, Poison Dagger 73,
  Corpse Explosion 74, Bone Wall 78, Poison Explosion 83, Bone Spear 84, Bone Prison 88,
  Poison Nova 92, Bone Spirit 93) per 1.13c ground truth.
- Decouple damage formulas into standalone exported functions: calculateTeethDamage,
  calculateBoneArmorCapacity, calculatePoisonDaggerDamage, calculateCorpseExplosionDamage,
  calculateBoneWallStats, calculatePoisonExplosionDamage, calculateBoneSpearDamage,
  calculateBonePrisonStats, calculatePoisonNovaDamage, calculateBoneSpiritDamage.
- Preserve BATCH1_SKILLS length strictly at 38 skills.
- Enforce 2:1 isometric ground projection geometry (ISO_GROUND_ASPECT_RATIO = 0.5)
  for collision, radial Poison Nova bursts (64 bolts), and trajectory kinematics.
- Implement Bone Spirit homing steering and Bone Spear piercing (collideKill = 0).
- Integrate casting lifecycle in act-scene: mana deduction, overlays, corpse consumption,
  and dagger weapon requirement for Poison Dagger.
- Add comprehensive 37-test suite in tests/skills/nec/poison-bone.test.ts.
2026-09-24 08:37:27 +00:00
troytt f424a92a1d Merge branch 'feat/lighting-system' into main: Diablo II v1.13c Glide dynamic lighting system
- P0: Trans === 1 missile additive blending, || 255 stripped, 136-level lighting metadata
- P1: D2Client dLightMap.c & D2Common D2Environment.cpp reverse engineering
- P1: LightGrid (48x48 integer dynamic lightmap, Alpha-Max-Plus-Beta-Min falloff, obstacle attenuation)
- P1: Environment (25Hz day/night solar sine cycle, Act IV targets, indoor static levels)
- P1: WebGL2 multi-texture shader pipeline, zero vertex stride changes (FLOATS_PER_VERTEX = 10)
- P1: Full act-scene integration with player torch, missiles, explosions, additive objects, unshaded minimap overlay
2026-09-24 08:21:04 +00:00
troytt b51d839d8c feat(lighting): implement authentic Diablo II v1.13c Glide dynamic lighting system
- P0 Data Contract Fixes:
  * Fix missile additive blending to use authentic 1.13c Missiles.txt trans === 1
  * Strip developmental || 255 fallback from color channels to preserve authentic 0 values
  * Add full 136-level lighting metadata from Levels.txt in levels-meta.ts
  * Wire MonStats2 and Overlay lighting in data-registry.ts

- P1 Reverse Engineering & Math Specification:
  * Reverse engineer D2Client.dll (dLightMap.c) and D2Common.dll (D2Environment.cpp)
  * Implement Alpha-Max-Plus-Beta-Min fast Euclidean distance approximation
  * Implement 16.16 fixed-point linear falloff and obstacle attenuation
  * Implement intensity-weighted color blending with reciprocal lookup table

- P1 Core Modules:
  * LightGrid: 48x48 cell dynamic lightmap with sub-tile bilinear interpolation and RGBA8 export
  * Environment: 25Hz day/night clock, outdoor solar sine curve, Act IV targets, indoor static levels

- P1 Shader & Renderer Integration:
  * Maintain strict 10-float vertex stride (FLOATS_PER_VERTEX = 10)
  * Transform screen coordinates to sub-tiles in vertex shader for v_lightUv
  * Glide diffuse modulation in fragment shader with additive blend bypass
  * Lazy 48x48 lightmap texture allocation ensuring zero overhead for unlit contexts
  * Single-pass draw call batching maintained (drawCalls === 1)

- P1 Scene Integration & Verification:
  * Wire LightGrid and Environment into act-scene.ts
  * Add player torch with subtle flicker, missile lights, explosion flashes, and additive objects
  * Unshaded minimap overlay by resetting lighting prior to minimap.draw
  * Add comprehensive test suites: data-contract-lighting, light-grid, scene-lighting
2026-09-24 08:02:29 +00:00
troytt f64440c378 fix(combat): resolve static typecheck errors and event double-clear race (Fixes #404) 2026-09-24 07:18:35 +00:00
troytt b327e5ee77 test(skills): persist Necromancer M1 asset challenger adversarial stress test suites 2026-09-24 07:04:38 +00:00
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 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 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