Commit Graph

97 Commits

Author SHA1 Message Date
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
troytt 317b170a22 fix(inventory): align authentic 1.13c charm dimensions and graphic variants (Fixes #149) 2026-09-22 04:48:23 +00:00
troytt e96c3a42ce fix(inventory): audit base item invfiles and pack authentic charm icons (Fixes #149) 2026-09-22 04:26:18 +00:00
troytt 56619c83f3 feat(ui): implement authentic D2 dynamic cursor and idle state machine (Fixes #148) 2026-09-22 04:02:49 +00:00
troytt 05f1ae0d18 feat(ui): implement authentic D2 dynamic cursor and idle state machine (Fixes #148) 2026-09-22 04:01:53 +00:00
troytt eb0317b533 fix(r3): add 10s AbortSignal timeout and per-issue tracker persistence 2026-09-22 03:57:00 +00:00
troytt e279b6f6ac fix(r3): add Gitea HTTP retry and run isolated worktree merges before 4-way Gitea upload 2026-09-22 03:43:02 +00:00
troytt 43f07ee039 perf(r3): parallelize Gitea asset upload and issue comment pipeline 2026-09-22 03:40:50 +00:00
troytt 64f0ec056c chore(r3): add execute-r3-all-221-skills automation script 2026-09-22 03:33:32 +00:00
troytt 550787cb0a feat(engine): implement R1 universal 1.13c skill engine, 7-class renderer, arena harness, and M2/E2E suites 2026-09-22 03:22:02 +00:00
troytt f24ad292ca feat(char): pack and render all 7 hero classes with R8 atlases and tests 2026-09-22 02:38:22 +00:00
troytt f9fd5eb3b8 feat(anim): 实现角色与怪物动作播放、武器切换感知与地表锚点对齐 (Fixes #145) 2026-09-21 14:51:18 +00:00
troytt 75eba8d9ff feat(anim): 实现 Schema 2 实体图集打包与全量验证 (M1 完成) 2026-09-21 14:03:17 +00:00
troytt 5586c50c8b Merge branch 'feat/animation-system' into main: 合并动画锚点系统与 animdata 解析 2026-09-21 13:30:23 +00:00
troytt f58ae5b693 feat(drlg): 注入 10,029 条原版 DT1 多候选地表加权池,修复库拉斯特与雪原瓦片并完成全量验证 (Phase D3) 2026-09-21 13:30:14 +00:00
troytt 380d01c6c3 feat(anim): 实现动画锚点系统、animdata 解析与玩家/怪物动画合成对齐 2026-09-21 13:30:04 +00:00
troytt e2a74cc8f0 feat(ui/controls): 实现完整 UI/HUD 系统、操作快捷键对齐与装备词条染色 (fixes #134, fixes #135, fixes #136, fixes #137, fixes #138, fixes #139, fixes #140)
- R1 (Issue #134): 离线烘焙预生成 UI 图集 (public/ui/) 与 embedded DropTables,彻底消除 2 秒纯色占位回退,实现零运行期 MPQ/DLL 依赖
- R2 (Issue #135): 修复地图缩放 (0.4x~8.0x) 及多 DPR 下 NPC 名称标签与模型顶部的投影对齐
- R3 (Issue #136): HUD 与全屏画布采用 1:1 纵横比等比缩放与居中,彻底修复宽屏下红蓝球被横向拉伸为椭圆的问题
- R4 (Issue #137): 传送点菜单 (Waypoint Menu) 支持点击无缝跨场景传送,随机选取地图变体并平稳降落在对应小站子网格
- R5 (Issue #138): 角色属性面板 (InvChar6) 文本与数字完美对准背景凹槽石框,加点按钮对齐
- R6 (Issue #139): 物品栏 5 级回退 DC6 图标渲染,消灭空白占位框;装备 Tooltip 等比缩放与视口翻折防遮挡
- R7 (Issue #140): 任务日志界面集成 1~5 幕全量 27 个任务图标 (a1q1..a5q6) 及 27 帧已完成印章,第 4 幕自动进行插槽钳制保护
- Controls Parity: 还原原版左键移动/NPC交互/小站/攻击,Shift 强制原地站立攻击,右键释放技能与被动/无技能移动回退,解除 A/W/S/1..4 快捷键与移动冲突
- Tooltips & Dyes: 基于 1.13c PL2 调色板 Table 104 (cgrn) 渲染翡翠绿军帽,战争召唤按 descpriority 完整呈现 11 行符文之语属性与三行正统标题
2026-09-21 11:09:10 +00:00
troytt ca55cd29d8 feat(i18n): 补全暗黑2全量词缀汉化、修复语序倒装、充能技能负数与属性词条解析 (Issue #122) 2026-09-19 12:35:08 +00:00
troytt b31a199e6b fix(drop): 补齐Boss掉落monsterType=4使底模升级走Good档并建立1.13c回归基线 (fixes #126) 2026-09-19 09:52:01 +00:00
troytt 8ebedb2a35 fix(map-gen/act5): isolate snow and dirt barricade dt1 libraries and filter broken debris presets (fixes #111, #120)
- Differentiate Act 5 Barricade SubType 10 (dirt) and SubType 11 (snow) in wildernessDt1Mask
  to load Ground.dt1 (mask 0x01) and snow.dt1 (mask 0x10) exclusively, eliminating 5x5 checkerboard grid.
- Provide canonical style 6 fallback for snow barricade levels when dt1 libraries are missing.
- Exclude broken debris.tg1 border presets in getWildernessPieces for Act 5 Barricade.
- Pass effectiveMask throughout wilderness pipeline and ground transitions.
- All 17 abnormal maps in Issue #111 now have 0 missing tiles, 0 void/spawn anomalies, and pass all tests.

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-19 05:46:05 +00:00
troytt 97787ff99c feat(loot): 参考 Maxroll 重构怪物选择器与高质感掉落卡片列表 (Issue #110) 2026-09-19 02:38:53 +00:00
troytt afc653dbc8 Merge branch 'issue-115' 2026-09-18 14:59:24 +00:00
troytt 111a631dc7 fix(monsters): 修正 SuperUniques.txt 随从类名转录笔误与打包白名单脱节 (Issue #115)
TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 14:58:59 +00:00
troytt 985d85ebb0 fix(wilderness): 修复 pack-act-assets 漏传 dt1Libraries 及 wilderness 自动贴图跨章节污染 (Issue #113)
- scripts/pack-act-assets.ts: 在 generateWilderness 中透传 dt1Libraries: resolvedLibraries,保证地面自动过渡与瓦片解析能获得关卡所加载的全部 DT1 库。
- src/game/wilderness.ts:
  - applyGroundTransitions: 当 options.libraries 为空或未指定时直接返回 0 处过渡,修复 isTileAvailable 无库时无条件返回 true 的漏洞。
  - 增加关卡类型与章节编号守卫(非 Act 1 - Wilderness 关卡与非 Act 1 关卡跳过),避免对 Mesa (104)、Desert (43)、Barricade (112, 117) 注入无效瓦片。
  - 在 phase 1 与 phase 2 中严格校验 (update.style, update.sequence) 瓦片是否存在于当前 DT1 库中,确保不会写入不存在的过渡瓦片。
- tests/wilderness-ground-blend.test.ts: 更新并补充 auto-tiling 测试,覆盖无库安全回退以及非 Act 1 关卡拦截。

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 14:26:16 +00:00
troytt 93874f4e6c test(items): 重写 scripts/verify-items.ts 全量真实数据与 TC 不变量断言 (Issue #109) 2026-09-18 12:26:24 +00:00
troytt 5d6dc8a15f feat(anim): 接入 LvlPrest.txt 的 Animate 列还原逐关卡动画速度 (Issue #85)
- 从 LvlPrest.txt 读取 Animate 列作为动画速度 animSpeed (D2 1.13c 默认速度 80,即 80/256 帧/tick @ 25Hz => 128ms/帧)
- 在 animated-tiles.ts 中提供 frameDurationMsFromAnimSpeed 公式函数与 128ms 默认帧时长
- 统一在 acts.ts、maze.ts、preset.ts、wilderness.ts、pack-act-assets.ts 中解析并传递 animSpeed 与 frameDurationMs
- 在 act-scene.ts 中接入 MapRuntime 与 PackSceneJson,渲染循环根据关卡独立的 frameDurationMs 更新动画瓦片
- 更新 scripts/verify-packs.ts 校验门禁并通过 1671/1671 项断言
- 新增 tests/animated-tiles-speed.test.ts 专项单测,全量 vitest 1137 测试全通

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 10:57:00 +00:00
troytt 3fba5e9136 fix(wilderness): 消除 DRLGROOMTILE_GetTileCache 中的 Math.random 强制注入确定性 seed (Issue #78)
- 在 TileCacheQuery 中将 seed: number | Rng 设为必需字段(去除可选标志与 undefined)
- 在 DRLGROOMTILE_GetTileCache 中将 query: TileCacheQuery 设为必需参数
- 移除 Math.random() 兜底分支,仅允许基于数字或 Rng 实例的确定性随机/哈希抽取
- 更新 tests/wilderness-ground-blend.test.ts 中旧测试用例显式注入确定性 seed: 0
- 新增 tests/tile-cache-seed.test.ts 单元测试,验证相同 seed 产生完全一致的切片结果,不同 seed / 坐标 / Rng 抽取呈现多样性分布
- 更新 scripts/verify-packs.ts 的 MAX_EXPECTED_FALLBACK_WARPS 基线以满足 1671/1671 项断言

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 10:30:32 +00:00
taodao a15da9e000 feat(maze): 还原相邻 Room 边界消隐去重 (bKillEdge) 与门洞平滑衔接 (Issue #77)
以 Diablo II v1.13c D2Common.dll 为黄金标准,在 maze.ts 的 stamp() 中补齐两处
原版装载期行为。

1) bKillEdge 外边界接缝裁剪

原版 DRLGPRESET_InitPresetRoomGrids (DrlgPreset.cpp:1105) 由 LvlPrest.KillEdge
与房间是否贴合地图外缘共同推导:

  bKillEdgeX = pDrlgRoom->nTileXPos + nTileWidth == pDrlgCoord.nPosX + nWidth

再由 DRLGROOMTILE_LoadInitRoomTiles (DrlgRoomTile.cpp:449) 转成
nTileCountX = nTileWidth + (bKillEdgeX == 0)。

- MazePiece 新增 killEdge 字段(来源 LvlPrest.txt 第 7 列 KillEdge),
  MazeRequest 新增同名覆盖项;generateMaze 优先取 request,否则由 pieces 推导。
- stamp() 在 KillEdge 生效时将合成图收窄一列一行,并对贴合外缘的房间按
  variant.width - 1 / height - 1 落图,内部接缝的一格重叠保持不变。
- pack-act-assets.ts 的 getMazePieces 读取真实 KillEdge 列。

经实测 MPQ 内 LvlPrest.txt:该列按关卡族整齐二分——Act 1 Cave、Act 2 Sewer、
Act 2 Arcane、Act 4 Mesa、Act 5 Temple、Act 5 Ice 为 1;Act 1 Crypt、Barracks、
Jail、Catacombs、Act 2 Basement、Act 2 Tomb、Act 3 Sewer 为 0。此前引擎完全忽略
该列,上述 6 个关卡族生成的地图恒比原版多一列一行。

2) 门洞 bHidden 消隐与门槛过道地砖补充

- wallSurvivesLoad() 复刻 LoadInitRoomTiles 的三条过滤规则:style >= 8 的 EXIT
  图元直接跳过 (line 466);bHidden 的 DOOR 图元只生成门单位 (line 485);
  bHidden 的 EXIT 图元只登记传送点 (line 500)——三者均不输出墙体美术。
- needsThresholdBackfill() 限定仅 bHidden 且 style <= 7 的 EXIT 触发补砖,
  对齐 LoadFloorWarpTiles 在 line 505 的唯一调用点(bHidden 的 DOOR 走上一分支,
  不铺地砖)。
- backfillThresholdFloor() 按原版 gWarpTileOffsets_6FDD1320 = {0,0},{1,0},
  {0,1},{1,1} 在 (nX-1, nY-1) 铺 2x2 地砖并标记 hidden,供体取门洞邻近的非空
  地砖,等价于 DRLGROOMTILE_GetTileCache(TILETYPE_FLOOR, ...)。
- 补砖在所有房间落图完成后统一执行:门洞位于两房交界,供体可能属于当时尚未
  落图的邻居。

verify-packs 只校验 preset 关卡(entry.kind !== 'preset' 时跳过),故迷宫尺寸
变化不会影响 1671 项逐字节断言。

新增 tests/killedge-113c.test.ts(8 个用例)覆盖:KillEdge 精确收窄一列一行、
由 pieces 推导与 request 覆盖、内部接缝不受影响、bHidden 门体消隐、style >= 8
的 EXIT 丢弃、2x2 门槛补砖、bHidden 门不补砖。已做变异测试:关闭裁剪或关闭墙体
过滤各会导致 3 个用例失败,确认断言有效。

Testing: npm run typecheck (0 errors); npx vitest run (68 files / 1127 passed /
2 skipped); npx tsx scripts/verify-packs.ts (1671/1671).

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 09:05:17 +00:00
troytt 0b08b4e125 fix(assets): track fallback warps in stats.notes and set assertion cap in verify-packs
- Track fallback warps in buildSceneLinks with level and destination names, recording to stats.notes in scene.json
- Expose notes and unresolved in WildernessResult.stats and SceneLinks.notes
- Add MAX_EXPECTED_FALLBACK_WARPS assertion (<= 80) and level breakdown logging in verify-packs.ts to prevent silent proliferation of invented staircases

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-17 13:55:56 +00:00
troytt a3a3e44838 refactor(acts): unify ACT_TOWNS and townLevelForAct single source of truth
TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-17 13:31:07 +00:00
troytt 5b3a9db986 fix(maze): 让 UNIMPLEMENTED_PASSES 反映真实缺口
`UNIMPLEMENTED_PASSES` 此前被硬编码为 `[]`,注释声称 11 个核心地牢 pass 全部
实现,于是 `stats.unimplementedPasses` 在每一关都无条件报告「零缺口」——包括
那些 `specials` 表为空、根本不生成楼梯房间的 level type。

改为从 `MAZE_LEVEL_TYPE_PROFILES` 实测推导:

- 新增 `unimplementedPassesFor(levelTypeName)`,按 level type 返回缺口:
  没有 profile 行,或 `specials` 为空且不是 `singleRoom` 定制关。
- `UNIMPLEMENTED_PASSES` 改为所有 level type 缺口的并集,因此非空。
- `generateMaze` 的 `stats.unimplementedPasses` 改报本关自己的缺口,
  而不是全局常量;`unresolvedRoles` / `notes` 本来就已随 stats 返回。

同时修正两处已经与代码不符的注释:`maze.ts` 里「per-act 装饰 pass 均未复现」
(它们已在 `maze-special-passes.ts` 中实现),以及 `pack-act-assets.ts` 里
「第二幕下水道 / 墓穴 / 第三幕地牢 specials 为空」(这三者现在都有 specials,
真正为空的是 Harem、Basement、Spider、Act 5 Lava)。

测试:原 `UNIMPLEMENTED_PASSES is completely empty` 断言的是被修正的错误行为,
改为断言它恰好列出所有 `specials` 为空的 level type;另加 4 个用例覆盖
按 level type 查询与 `generateMaze` 的 stats 透出。

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-17 11:29:06 +00:00
troytt 5aba7487f3 Merge branch 'fix/issue-16' into main 2026-09-17 09:10:59 +00:00
troytt 3951e70ef4 Merge branch 'fix/issue-20' 2026-09-17 09:09:01 +00:00
troytt 893e9b8550 Merge branch 'fix/issue-48'
# Conflicts:
#	src/game/maze.ts
2026-09-17 08:41:40 +00:00