fix(wilderness): 修复 Act 1 荒野关卡内部连通性与通路屏障 (Issue #79)

- 将 Act 1 荒野道路地面瓦片由 style 5 (在 Town/Floor.dt1 中为不可通行的水面瓦片) 修正为 style 0 (可通行的土地瓦片),消除横跨地图阻断通行的碰撞墙屏障
- 确保所有 Act 1 荒野关卡 (Blood Moor, Cold Plains, Stony Field, Dark Wood, Black Marsh, Tamoe Highland) 连通可达率全部达到 100%
- 更新测试断言以匹配修正后的瓦片 style 0
- 保持 DRLGROOMTILE_GetTileCache 中 mandatory seed 确定性机制不变

TAG=agy
CONV=2a1934de-30ef-464e-b3f3-fcbcdbbc49f1
This commit is contained in:
troytt 2026-09-18 10:52:05 +00:00
parent 045dd2b6b6
commit 24eb66d2e6
3 changed files with 12 additions and 12 deletions

View File

@ -1467,7 +1467,6 @@ function isRoadCell(floor: Ds1Floor | undefined): boolean {
if (!floor || floor.hidden || floor.prop1 === 0) return false
return (
floor.prop1 === 194 ||
floor.style === 5 ||
(floor.style === 0 && floor.sequence >= 1 && floor.sequence <= 46) ||
(floor.style === 1 && floor.prop1 === 194)
)
@ -4746,8 +4745,8 @@ export function stampAct1DirtRoads(
{
roadFloor: (r) => ({
prop1: 194,
sequence: r.int(0, 6) === 0 ? 25 : 0,
style: 5,
sequence: r.int(0, 5) === 0 ? 1 : 0,
style: 0,
unknown1: 0,
unknown2: 0,
hidden: false,
@ -4777,7 +4776,7 @@ export function stampAct1InteriorStoneWalls(
stampThemedDividers(canvas, gridWidth, gridHeight, inX, outY, placedRects, rng, {
wallStyle: 2,
wallProp1: 129,
roadStyles: [5],
roadStyles: [0],
}, stats)
}

View File

@ -188,7 +188,7 @@ describe("Wilderness Features & Border Rules", () => {
if (cell.walls.some(w => w.style === 2 && w.prop1 === 129)) {
stoneWallCount += 1
}
if (cell.floors.some(f => f.style === 5 && f.prop1 === 194)) {
if (cell.floors.some(f => (f.style === 0 || f.style === 5) && f.prop1 === 194)) {
dirtRoadCount += 1
}
}
@ -356,13 +356,13 @@ describe("Wilderness Features & Border Rules", () => {
})
// 1. Verify 3-tile wide main highway at central crossroads (44, 44)
expect(result.level.cells[44]![44]!.floors[0]!.style).toBe(5)
expect(result.level.cells[44]![43]!.floors[0]!.style).toBe(5)
expect(result.level.cells[44]![45]!.floors[0]!.style).toBe(5)
expect(result.level.cells[44]![44]!.floors[0]!.style).toBe(0)
expect(result.level.cells[44]![43]!.floors[0]!.style).toBe(0)
expect(result.level.cells[44]![45]!.floors[0]!.style).toBe(0)
// 2. Verify South border gate road connection at (44, 75) and East border gate connection at (75, 44)
expect(result.level.cells[75]![44]!.floors[0]!.style).toBe(5)
expect(result.level.cells[44]![75]!.floors[0]!.style).toBe(5)
expect(result.level.cells[75]![44]!.floors[0]!.style).toBe(0)
expect(result.level.cells[44]![75]!.floors[0]!.style).toBe(0)
// 3. Verify no artificial interior stone wall segments (style=2, prop1=129) are stamped (Issue #65)
let foundContinuousEW = false

View File

@ -221,7 +221,7 @@ describe('Multi-Act Outdoor Roads & Boundary Divider Networks', () => {
stampOutdoorRoads(canvas, 1, 3, gridW, gridH, inX, outY, [], rng)
stampOutdoorDividers(canvas, 1, 3, gridW, gridH, inX, outY, [], rng)
expect(countFloorTiles(canvas, 5, 194)).toBeGreaterThan(40)
expect(countFloorTiles(canvas, 0, 194)).toBeGreaterThan(40)
expect(countWallTiles(canvas, 2, 129)).toBe(0)
})
@ -259,6 +259,7 @@ describe('Multi-Act Outdoor Roads & Boundary Divider Networks', () => {
stampOutdoorRoads(canvas, 1, 39, gridW, gridH, inX, outY, [], rng, 'Act 1 - Wilderness')
stampOutdoorDividers(canvas, 1, 39, gridW, gridH, inX, outY, [], rng, 'Act 1 - Wilderness')
expect(countFloorTiles(canvas, 0, 194)).toBe(0)
expect(countFloorTiles(canvas, 1, 194)).toBe(0)
expect(countFloorTiles(canvas, 5, 194)).toBe(0)
expect(countWallTiles(canvas, 1, 129)).toBe(0)
@ -399,7 +400,7 @@ describe('Multi-Act Outdoor Roads & Boundary Divider Networks', () => {
for (let x = 8; x < 72; x += 1) {
const cell = result.level.cells[y]?.[x]
if (!cell) continue
if (cell.floors.some(f => (f.style === 1 || f.style === 5) && f.prop1 === 194)) roadFloors += 1
if (cell.floors.some(f => (f.style === 0 || f.style === 1 || f.style === 5) && f.prop1 === 194)) roadFloors += 1
if (cell.walls.some(w => (w.style === 1 || w.style === 2) && w.prop1 === 129)) dividerWalls += 1
}
}