Skip to content

Commit

Permalink
Fix Castle Britannia get a moongate dropped on top of it
Browse files Browse the repository at this point in the history
  • Loading branch information
Fenyx4 committed Jan 26, 2021
1 parent 5bc5066 commit c7f709e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion U4DosRandomizer/WorldMapGenerateMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ private void RandomizeLocations(UltimaData ultimaData, Random random)
possibleLocations.Remove(loc);
ultimaData.Moongates[i].X = loc.X;
ultimaData.Moongates[i].Y = loc.Y;
excludeLocations.Add(ultimaData.Moongates[i]);
}
}
if (distance == 0)
Expand All @@ -479,7 +480,7 @@ private void RandomizeLocations(UltimaData ultimaData, Random random)
Tile lcbEastSide = GetCoordinate(lcb.X + 1, lcb.Y);

path = new List<ITile>();
if (IsWalkableGround(lcb) && IsWalkableGround(lcbEntrance) && !excludeLocations.Contains(lcb))
if (IsWalkableGround(lcb) && IsWalkableGround(lcbEntrance) && !excludeLocations.Contains(lcb) && !excludeLocations.Contains(lcbWestSide) && !excludeLocations.Contains(lcbEastSide))
{
path = Search.GetPath(SIZE, SIZE, lcbEntrance,
// Gotta be able to walk to a Moongate from LCB
Expand Down

0 comments on commit c7f709e

Please sign in to comment.