diff --git a/Game/Dungeon/DungeonGeneratorVNext.cs b/Game/Dungeon/DungeonGeneratorVNext.cs index f66986e..9a9776d 100644 --- a/Game/Dungeon/DungeonGeneratorVNext.cs +++ b/Game/Dungeon/DungeonGeneratorVNext.cs @@ -541,6 +541,18 @@ public class DungeonGeneratorVNext continue; } + // If this cell has a specific 8-direction corner/diagonal match that exists in the + // current palette, defer to pass 2 so corners do not get flattened by broad cardinal buckets. + int mask8 = ComputeEightDirectionMask(layout, cell.X, cell.Y); + string? specific8Bucket = ResolveEightDirectionBucketName(mask8); + if (!string.IsNullOrEmpty(specific8Bucket) && + tileContext.WallDefinitionsByCanonicalBucket.TryGetValue(specific8Bucket, out var defs8) && + defs8.Count > 0) + { + unresolved.Add(cell); + continue; + } + var wallDef = SelectWallDefinitionForBucket(tileContext, bucketName); if (wallDef == null) {