Commit Graph

164 Commits

Author SHA1 Message Date
troytt 0535a63174 Merge branch 'issue-112' 2026-09-18 14:32:12 +00:00
troytt ed344259a1 fix(tiles): 参照 1.13c DRLGROOM_LoadDt1Files 补充常驻全局通用 DT1 (InvisWal / Blank / Warp) (Issue #112)
参照 1.13c D2Common.dll (DRLGROOM_LoadDt1Files @ 0x6fdb8400),在加载完 LvlTypes.txt 后无条件追加 3 个全局常驻通用 DT1:
- data\global\tiles\Act1\Outdoors\Blank.dt1
- data\global\tiles\Act1\Barracks\InvisWal.dt1
- data\global\tiles\Act1\Barracks\Warp.dt1

其中 InvisWal.dt1 包含 style=49 sequence=7 的地面阻挡瓦片 (walk-blocking collision invisible wall),解决了 Act 5 Hell 1 (125) 和 Pandemonium 3 (135) 等全地图漫游中报 missingTile: floor style=49 sequence=7:0 的问题。

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 14:31:42 +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 370dcc05b1 feat(items): 用 TC 树替换 rollDrop 并彻底删除 demo 物品数据 (Issue #107) 2026-09-18 12:54:50 +00:00
troytt 064e956de6 feat(items): 用 TC 树替换 rollDrop 并彻底删除 demo 物品数据 (Issue #107) 2026-09-18 12:54:21 +00:00
troytt 6a85c96a5b feat(items): 新增掉落模拟器与概率表网页 loot.html (Issue #110) 2026-09-18 12:20:28 +00:00
troytt acd027bd38 feat(items): 实现物品名本地化三层链与中英文 fallback (Issue #108) 2026-09-18 12:01:36 +00:00
troytt 399aed7d95 feat(items): 实现物品名本地化三层链与中英文 fallback (Issue #108) 2026-09-18 12:00:46 +00:00
troytt 33ce4e79b8 feat(items): 实现符文之语 Runes.txt 与镶嵌装配 (Issue #105) 2026-09-18 11:55:36 +00:00
troytt 3cdf9dc8fc feat(items): 实现符文之语 Runes.txt 与镶嵌装配 (Issue #105) 2026-09-18 11:55:12 +00:00
troytt b576f634be feat(items): 实现 TreasureClassEx 展开算法 (Issue #101) 2026-09-18 11:50:29 +00:00
troytt bc05af8baa feat(items): 实现 TreasureClassEx 展开算法 (Issue #101) 2026-09-18 11:49:45 +00:00
troytt 8b61ed059f feat(items): 实现宝石与符文镶嵌属性 Gems.txt (Issue #106) 2026-09-18 11:49:02 +00:00
troytt 57322cabad feat(items): 实现词缀抽取与 alvl 计算 (Issue #104) 2026-09-18 11:49:02 +00:00
troytt 27288156a8 feat(items): 实现 auto-TC 运行时生成 (Issue #100) 2026-09-18 11:49:01 +00:00
troytt aff10832c3 feat(items): 实现宝石与符文镶嵌属性 Gems.txt (Issue #106) 2026-09-18 11:48:37 +00:00
troytt 390816c4cc feat(items): 实现词缀抽取与 alvl 计算 (Issue #104) 2026-09-18 11:48:25 +00:00
troytt ce07af1b9a feat(items): 实现 auto-TC 运行时生成 (Issue #100) 2026-09-18 11:47:34 +00:00
troytt 6754df22eb feat(items): 实现 ItemRatio 品质判定 (Issue #102) 2026-09-18 11:47:25 +00:00
troytt 6991ffa249 feat(items): 实现 ItemRatio 品质判定 (Issue #102) 2026-09-18 11:46:42 +00:00
troytt 94be8ceb87 feat(items): 实现 exceptional / elite 基底升级 (Issue #103) 2026-09-18 11:46:21 +00:00
troytt ca3512f195 feat(wilderness): 还原边界顶点链表与格子级土路算法替换 Catmull-Rom 样条 (Issue #82)
- 实现 DRLGVER_CreateVertices (D2MOO DrlgDrlgVer.cpp:15-226):
  * 构建关卡边界矩形封闭双向循环链表 (顺时针 V0(0,0), V1(w,0), V2(w,h), V3(0,h))
  * 对边界连接/门/预置插入 1-2 个顶点 (支持 span [v15, v16])
  * 设置标识: dwFlags |= 1 (连接), 预置房 dwFlags |= 2
  * 采用相对坐标 (x - originX, y - originY)
  * 消耗 0 次随机数 rolls
  * 从 UNIMPLEMENTED_PASSES 移除 DRLGVER_CreateVertices
- 实现 DRLGOUTDOORS_CalculatePathCoordinates (DrlgOutdoors.cpp:1139-1168):
  * 边界顶点 8 格吸附 (ALTDIR_WEST: +11, ALTDIR_NORTH: +11, ALTDIR_EAST: -5, ALTDIR_SOUTH: -5)
  * Math.trunc 保持 C 整数截断一致性
  * 兼容 (pLevel, pVertex1, pVertex2) 与 (vertex, origin) 调用签名
- 实现 DRLGOUTDOORS_CalculateHubCoordinates (DrlgOutdoors.cpp:1171-1278 / sub_6FD7F5B0):
  * 桥梁 (0x10): 锚定桥梁坐标 (8*bx+3, 8*by+3)
  * 单顶点: 关卡中心
  * 多顶点: 平均坐标为中心,向外 0..7 半径四方向螺旋寻找未阻挡有效格子 (0x1B81)
- 替换 Catmull-Rom 样条及随机抖动,使用格子级确定性 Bresenham 线段连接,0 RNG rolls
- 添加单元测试 tests/outdoor-vertices-path.test.ts 覆盖全部算法特性

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 11:37:20 +00:00
troytt 6ead63c6c5 feat(items): 加载 SetItems.txt 与 Sets.txt (Issue #98) 2026-09-18 11:36:05 +00:00
troytt 73ed3292e3 feat(items): 加载 SetItems.txt 与 Sets.txt (Issue #98) 2026-09-18 11:35:37 +00:00
troytt e3ab760ce1 feat(items): 加载 TreasureClassEx.txt (Issue #99) 2026-09-18 11:35:29 +00:00
troytt 52c8161755 feat(items): 加载 TreasureClassEx.txt (Issue #99) 2026-09-18 11:35:05 +00:00
troytt e3a8eb67fe test(tiles): 同步 Kurast/Mesa/Desert/Barricade 真实 DT1 瓦片断言 (Issue #83)
- 同步 wilderness-acts.test.ts、wilderness-roads-multi-act.test.ts、wilderness-siege-strips.test.ts 断言以适配真实的 DT1 瓦片编号
- 微调 wilderness-siege.ts 破损木桩 sequence 与投石台矮墙 prop1

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 11:32:55 +00:00
troytt 9b980b8218 feat(items): 加载 UniqueItems.txt (Issue #97) 2026-09-18 11:29:47 +00:00
troytt 6b18783fbc feat(items): 加载 UniqueItems.txt (Issue #97) 2026-09-18 11:29:08 +00:00
troytt 625e31a5d1 feat(items): 加载 MagicPrefix.txt 与 MagicSuffix.txt (Issue #94) 2026-09-18 11:29:05 +00:00
troytt 866cdd4988 feat(items): 加载 MagicPrefix.txt 与 MagicSuffix.txt (Issue #94) 2026-09-18 11:28:39 +00:00
troytt d4e219fb02 feat(items): 加载 Misc.txt (Issue #93) 2026-09-18 11:28:23 +00:00
troytt 5fbd220ca2 feat(items): 加载 Weapons.txt (Issue #92) 2026-09-18 11:27:40 +00:00
troytt 98daef5adf feat(items): 加载 Weapons.txt (Issue #92) 2026-09-18 11:27:13 +00:00
troytt 050cb25dfe feat(items): 加载 Misc.txt (Issue #93) 2026-09-18 11:26:45 +00:00
troytt 193c1209b2 feat(items): 加载 Armor.txt (Issue #91) 2026-09-18 11:24:47 +00:00
troytt 7187154ac8 feat(wilderness): 还原 DRLGOUTDOORS_SpawnAct12Waypoint 原版 8x8 单元网格打乱与有效性判定 (Issue #80)
- 还原 1.13c 原版 DRLGOUTDOORS_SpawnAct12Waypoint (D2Common.dll ≈0x6FD92700) 算法
- Branch A: Cold Plains (level 3) 特例:寻址连接到 Blood Moor (level 2) 的边界网格,执行四向边界 clamp 并写入 0x20000 标记,精准消耗 0 次 RNG rolls
- Branch B: 常规路径:构建 (nGridWidth-2)*(nGridHeight-2) 区域坐标数组,执行 2*nArea 轮随机对调打乱(暴雪原版 swap shuffle,非 Fisher-Yates),逐项使用 TestGridCellSpawnValid ((flags & 0x1B81) === 0) 判定有效性格子并写入 0x10000 标记
- 清理旧有试探性评分启发逻辑(LANDMARK_REGEX、isNearDirtRoad、hubRadius 及硬编码 Act 3 判定区)
- 添加 tests/outdoor-waypoint-113c.test.ts 单元测试并对齐已有测试用例

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 11:15:41 +00:00
troytt a1a549e8a0 feat(items): 加载 ItemStatCost.txt 与 Properties.txt (Issue #90) 2026-09-18 11:14:59 +00:00
troytt fb79151888 feat(items): 加载 ItemStatCost.txt 与 Properties.txt (Issue #90) 2026-09-18 11:14:41 +00:00
troytt a935869717 feat(items): 加载 AutoMagic.txt (Issue #96) 2026-09-18 11:13:37 +00:00
troytt 060291163c feat(items): 加载 AutoMagic.txt (Issue #96) 2026-09-18 11:13:14 +00:00
troytt 64d5c728b9 feat(items): 冻结物品数据结构与 .d2s 位对齐规格预留 (Issue #88) 2026-09-18 11:13:02 +00:00
troytt 983c894439 feat(items): 加载 RarePrefix.txt 与 RareSuffix.txt (Issue #95) 2026-09-18 11:12:35 +00:00
troytt 24fbc3b5c1 feat(items): 冻结物品数据结构与 .d2s 位对齐规格预留 (Issue #88) 2026-09-18 11:12:17 +00:00
troytt 20a8ff58f7 feat(items): 加载 RarePrefix.txt 与 RareSuffix.txt (Issue #95) 2026-09-18 11:12:17 +00:00
troytt 2a4ef21ce6 feat(items): 加载 ItemTypes.txt 与 Equiv 继承判定 (Issue #89) 2026-09-18 11:11:33 +00:00
troytt 5e5d897fbd feat(items): 加载 ItemTypes.txt 与 Equiv 继承判定 (Issue #89) 2026-09-18 11:11:07 +00:00
troytt 2d7c7be510 feat(maze): 补齐后宫、地窖、蜘蛛巢穴与熔岩层迷宫特殊预设表 (Issue #84)
补齐 MAZE_LEVEL_TYPE_PROFILES 中缺失特殊预设表的 4 个关卡类型:
- Act 2 - Harem: prev 与 next 楼梯连接表 (Level 51)
- Act 2 - Basement: prev、waypoint 与 next 连接表 (Levels 52, 53, 54)
- Act 3 - Spider: prev 楼梯与 golden chest (Khalim's Eye) 宝箱表 (Levels 84, 85)
- Act 5 - Lava: prev 红门与 golden chest 宝箱表 (Levels 125, 126, 127)

同时在 maze-special-passes 中补充对应 LvlPrest.txt Def 常量与 def registry,
使 UNIMPLEMENTED_PASSES 归零并通过全量测试。

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
2026-09-18 11:09:44 +00:00
troytt 928d42220c feat(rng): 实现 1.13c PRNG 64位 LCG 与 per-unit seed (Issue #87) 2026-09-18 11:08:37 +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