Commit Graph

130 Commits

Author SHA1 Message Date
troytt 526d623f66 Merge branch 'feat/automap-113c'
# Conflicts:
#	public/ui/manifest.json
#	src/scene/act-scene.ts
#	src/ui/baked-ui-meta.ts
2026-09-28 01:33:06 +00:00
troytt 14aa512e85 feat(automap): implement authentic Diablo II v1.13c isometric sprite Automap & Minimap 2026-09-28 01:27:10 +00:00
troytt b6fc2512d4 feat(drlg): generate Act I outdoor levels with the 1:1 D2MOO port (#455)
The eight Act I outdoor levels (Blood Moor 2, Cold Plains 3, Stony Field
4, Dark Wood 5, Black Marsh 6, Tamoe Highland 7, Burial Grounds 17, Moo
Moo Farm 39) are now generated by the function-by-function port of
D2MOO's D2Common DRLG in src/game/drlg, bit-exact against a native D2MOO
oracle. The legacy Act I generator (src/game/wilderness/*, the Blood Moor
branch and the Act I paths of wilderness.ts) is deleted; there is no
fallback. Acts 2-5 are unchanged.

Port (completes the kernel committed earlier):
- Tile-map stage: DRLGROOMTILE_AddRoomMapTiles with its tile-data,
  linked-tile and warp helpers, DRLGPRESET_AddPresetRoomMapTiles,
  DRLGOUTROOM_InitializeDrlgOutdoorRoom (drlg-outroom.ts), the
  DrlgDrlgLogic.cpp parts they reach (drlg-logic.ts), D2CMP shim updates.
- drlg-dump.ts: runAct1() driver API; schema 3 dumps with per-room tile
  lists. The port is now type-checked (tsconfig no longer excludes it).

Integration:
- drlg-map.ts (replaces drlg/adapter.ts): turns a generated level into
  the bake's DS1-shaped canvas with exact (style, sequence, type) per
  tile and per-cell DT1 masks, objects, seams from the DRLG level links,
  warps from their UNIT_TILE preset units; blank cells stay blocked.
- pack-act-assets: one D2 game seed per (act, variant), a DRLG bake job
  and index.json actLayouts; scripts/lib/drlg-mpq-source.ts feeds the
  port from the MPQs with the oracle's file list.
- act-variants.ts: WorldVariants picks one generated copy per act (and
  the Rogue Encampment DS1 that copy fixed); act-scene.ts and
  verify-world-walk both use it. act-scene no longer paints grass into
  the blank cells of DRLG scenes.
- world-graph: remove the invented Stony Field <-> Dark Wood seam
  (gAct1WildernessDrlgLink / gAct1MonasteryDrlgLink keep them apart;
  they meet only through the Underground Passage); world-placement
  anchors the second group at the Monastery Gate (3000, 1000).
- level-links: findBorderOpening takes an optional edge range.
- d2map: dt1MaskAllows extracted, behaviour unchanged.

Tools and tests:
- tools/d2moo-oracle: tile-map stage and schema 3; the 4 fixtures are
  regenerated (scripts/drlg-fixtures.ts).
- scripts/render-drlg-compare.ts (both dumps through the same adapter
  and renderer, fails unless the XOR is empty) and
  scripts/audit-levels-browser.ts (headless audit of every baked map).
- tests/drlg-act1-oracle.test.ts (all stages, all 4 fixtures) and
  tests/drlg-act1-invariants.test.ts; tests and stress scripts of the
  deleted generator are retired or now run on Acts 2-5 only.
- verify-world-walk: start in the town the runtime opens and floor the
  spawn sub-tile like the movement collision does.

Verification:
- drlg-diff --levels 2-7,17,39 --seeds 32: 32/32 identical at every
  stage; --trace-check 64/64, --isolated 32/32, difficulty 1 and 2 16/16.
- render-drlg-compare, 3 bake copies x 8 levels: 24/24 XOR empty.
- Full re-bake: 365 maps, 0 missing tiles. Browser audit: 355/365 maps,
  133/136 level ids clean (112/124/129: Act 5 minions without art, as
  before).
- verify:world-graph 37583 assertions; verify:world-walk 29/29;
  verify:entity-packs, typecheck clean. vitest 6369 passed; the 6
  failures (5 ground-item name formatting, 123-var3 waypoint) and the
  verify:packs / verify:generators failures also occur at bad6806.

Test pins updated, measured on the new bake: SceneEntrance 172 -> 166
and world-graph edges 286 -> 284 (the removed seam), seamless pairs
27 -> 26 and placement pairs 19 -> 18; full-spectrum floors / walls /
PNGs 1008898 / 237542 / 1390 (the old pins matched no bake of the
current code).

TAG=agy
CONV=a4f9163c-a011-4161-b169-7f361b1ed57e
2026-09-27 15:20:41 +00:00
troytt 3bf9a8c220 fix(ui): restore Horadric Cube Transmute and Close buttons per D2Client.dll 1.13c parity 2026-09-27 08:36:19 +00:00
troytt 8c5ae5c623 fix(ui): 补齐物品栏金币按钮 (goldcoinbtn.dc6) 并对齐金币栏数值 2026-09-27 08:16:53 +00:00
troytt 855d610168 fix(ui): 点击商人面板买/卖/修理按钮后鼠标样式切换为原版 buysell.dc6 交易光标 (Fixes #491) 2026-09-27 07:47:31 +00:00
troytt d998a0551b fix(ui): restore authentic D2 v1.13c NPC dialog popup menu (Fixes #489) 2026-09-27 06:41:10 +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 cccc6ff527 chore(scripts): include anim, missiles, overlays, entities, and world-graph in publish-packs 2026-09-26 13:32:51 +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 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 880b196c43 feat(ass): Milestone M26 Assassin Asset Pipeline and Trap Mechanics (closes #473) 2026-09-25 03:30:28 +00:00
troytt 51ac3b2d77 feat(dru): Milestone M21 Druid asset pipeline and foundation (closes #468) 2026-09-25 02:35:14 +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 e6b3c5b06d feat(ama): implement Milestone M11 Amazon assets, animations & foundation setup (#458) 2026-09-24 18:07:04 +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 d421a4549c test(audit): use authentic combat and drop pipeline in browser verification (Fixes #449) 2026-09-24 15:28:03 +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 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 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 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 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 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 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 96eee679b4 feat(skills): implement Skill #056 Meteor with 1.13c ground truth parity (Ref #401) 2026-09-23 12:36:17 +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 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 ef2dbcdbdf feat(pipeline): multi-worker concurrency architecture for entity animation packing (Fixes #396) 2026-09-23 09:55:05 +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 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 da24f9944f Merge branch 'issue-386' into main (Fixes #386) 2026-09-23 05:54:15 +00:00
troytt c814376e8a fix(ground-items): authentic ground item icon sprites and eliminate residual white dot 2026-09-23 05:48:03 +00:00
troytt 6eaeab4619 feat(skills): authentic 1.13c Cast Overlay system and elemental spell animations (Fixes #386) 2026-09-23 03:53:57 +00:00
troytt 3704e7d088 feat(scene): authentic 1.13c animated map objects and phase staggering (Fixes #387)
- Decode and extract all frames for map objects (DCC/DC6) in scripts/pack-act-assets.ts
- Deduplicate unique member art across object placements and pack into objectPages atlas
- Serialize animatedFrames, frameDelta, frameDurationMs, cycleAnim, and sync from Objects.txt into scene.json
- Support multi-frame MapRuntime ObjectDrawable ticking and rendering in src/scene/act-scene.ts
- Introduce SplitMix64 spatial phase hash (computeObjectPhaseOffsetMs) for non-synced objects to eliminate unnatural mechanical synchronization across scene torches and campfires
- Preserve backward-compatibility for single-frame static objects (Stash B6)
- Add 100% passing test suite in tests/object-animation-113c.test.ts
2026-09-23 03:14:14 +00:00
troytt ff867a13e3 feat(skills): authentic baked missile DCC atlas and explosion rendering 2026-09-23 02:35:55 +00:00
troytt 752d7e8066 feat(map): authentic Diablo II 1.13c shadow layer (type 13) rendering and pack verification 2026-09-23 01:22:51 +00:00
troytt 8f8ee010ca docs: update README with art assets, JSON data specifications, and UI parity 2026-09-22 13:12:25 +00:00
troytt 0c4af3770d feat(ui): replicate authentic D2 1.13c skill tree tabs and skill points banner (Fixes #377) 2026-09-22 09:50:40 +00:00
troytt 43748eac53 feat(inventory): support ring, amulet, jewel, and charm VarInvGfx graphic variants (Fixes #375) 2026-09-22 09:36:29 +00:00
troytt 9fac33a1e2 fix(skills): reconstruct skill tooltips to 1.13c formula and next level preview (Fixes #152) 2026-09-22 07:13:00 +00:00
troytt bc6b5cd331 feat(skills): add normal attack icon and enable dual left/right slot binding (Fixes #151) 2026-09-22 06:19:19 +00:00