diff --git a/C7Engine/MapGenerator.cs b/C7Engine/MapGenerator.cs index 3c502ba19..0061221fa 100644 --- a/C7Engine/MapGenerator.cs +++ b/C7Engine/MapGenerator.cs @@ -110,13 +110,19 @@ public static GameMap GenerateMap(WorldCharacteristics wc) { // for resources. AddBonusGrasslands(wc, gameMap); - // Step 10: Add barb camps. We do this towards the end to make sure + // Step 10: Place player starting locations + // Placing this before barb camps so barbs don't spawn <5 tiles away from players + // Tried placing barbs then players, but caused all players to spawn together + DetermineStartingLocations(wc, gameMap); + + // Step 11: Add barb camps. We do this towards the end to make sure // that we don't have barb camps on top of resources. + // Previously step 10 AddBarbarianCamps(wc, gameMap); // TODO: Goody huts, barbarian camps. - DetermineStartingLocations(wc, gameMap); + // Last step: Assign the terrain file and image ids to each tile so // we know which texture to use when displaying them. @@ -1339,6 +1345,9 @@ private static bool IsValidForBarbarianCamp(WorldCharacteristics wc, GameMap m, } } + // No barbarian camps less than 6 tiles away from a player + if (m.startingLocations.Any(x => t.distanceTo(x) < 6)) return false; + return true; }