[DRLG-M2] 统一 35 个预设关卡流水线与 8×8 Room 几何装配切片 #74
Labels
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: troytt/diablo2-web#74
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标与背景
以暴雪原版 1.13c
D2Common.dll(Ordinal 10006DRLGTYPE_PRESET) 及DRLGPRESET_BuildArea为黄金标准,拓展src/game/preset.ts。缺陷与审计发现
preset.ts仅专门支持混沌避难所 (Level 108),其余 34 个在Levels.txt中被定义为DrlgType == 2的预设关卡(罗格营地、鲁高因、库拉斯特海港、群魔堡垒、哈洛加斯 5 大城镇,以及安达利尔墓穴4层、女伯爵高塔5层、墨菲斯托憎恨之囚3层、督瑞尔古墓、远古之路等)未通过统一预设管线装配。DRLGPRESET_BuildArea将预设地图以 8×8 Tiles (40×40 Sub-tiles) 切分为多个D2DrlgRoom,分别挂载碰撞、动态图块与对象,用于视锥剔除与单位激活。当前 Web 引擎将其视为单一扁平画布。LvlPrest.txt中定义的File1..File6变体 (nPickedFile) 与朝向映射,确保特定关卡(崔斯特姆、女伯爵地下室等)的多样性。验收条件
DrlgType == 2) 的生成请求与解析装配。npm run typecheck0 errors。npx vitest run全量通过。npx tsx scripts/verify-packs.ts1671/1671 项逐字节完全匹配。验证与完成汇报
已完成全量 35 个预设关卡 (
DrlgType == 2) 的统一识别与分发,严格依照 1.13c 原版DRLGPRESET_BuildArea实现了 8×8 Tile (40×40 Sub-tile) 房间空间几何切分,并对齐了DRLGPRESET_AllocDrlgMap的 1.13c 确定性随机多文件变体选择。门禁验证通过:
npm run typecheck: 0 errorsnpx vitest run: 64 files / 1105 tests passed (新增 18 个针对预设切片与多变体的单元测试)npx tsx scripts/verify-packs.ts: 1671/1671 项断言逐像素/逐字节完全匹配代码已合并至
main(commit97ab449) 并推送到远程仓库,worktree 已清理。