[DRLG] 第二幕户外关卡改用 D2MOO 1:1 移植(关卡 41–46) #496
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?
背景
#455 的第一幕部分已完成(b6fc251):第一幕 8 个户外关卡(2–7、17、39)改由 D2MOO(D2Common 1.13c)逐函数 1:1 移植的 TypeScript 代码生成,并用原生 D2MOO oracle(
tools/d2moo-oracle)逐阶段比对:scripts/drlg-diff.ts --levels 2-7,17,39 --seeds 32在 act → levelGrid → rooms → maps → activation → mapTiles 全部阶段 0 差异。本 issue 用同样的方法处理第二幕。范围(Levels.txt
DrlgType = 3,第二幕)41 Rocky Waste、42 Dry Hills、43 Far Oasis、44 Lost City、45 Valley of Snakes、46 Canyon of the Magi。
需要移植的 D2MOO 函数
DrlgOutDesr.cpp:DRLGOUTDESR_InitAct2OutdoorLevel、DRLGOUTDESR_PlaceDesertTransitionToTownDrlgOutPlace.cpp:DRLGOUTPLACE_CreateLevelConnections的第二幕分支、DRLGOUTPLACE_LinkAct2Outdoors、DRLGOUTPLACE_LinkAct2CanyonDrlgOutdoors.cpp:DRLGOUTDOORS_GenerateLevel的第二幕分派。DRLGOUTDOORS_SpawnAct12Waypoint/SpawnAct12Shrines第一幕已移植,两幕共用。目前
src/game/drlg/中这些分支按规则直接 throw(未移植),第二幕仍走旧的近似生成器。同时删除(不留 fallback)
wilderness.ts旧生成器中第二幕的路径。world-graph.ts中第二幕臆造的门朝向(assignGateSides)和缝合边:真实的连接由DRLGOUTPLACE_CreateLevelConnections给出,和第一幕一样由烘焙写入actLayouts。验收
npx tsx scripts/drlg-diff.ts --levels 41-46 --seeds 32全阶段 0 差异(含 activation / mapTiles),另跑--isolated。scripts/render-drlg-compare.ts对比图 XOR 为空,缺失瓦片 0。scripts/audit-levels-browser.ts)通过;verify:world-graph、verify:world-walk通过。