From 07a91173ffc41550aaf66f52639f9441ccbf0629 Mon Sep 17 00:00:00 2001 From: elexis Date: Tue, 5 Sep 2017 22:34:57 +0000 Subject: [PATCH] Fix missing harbor and wild lake random biome implementation. Fix random biome gamesetup option and colorize the random item as proposed by bb. Remove duplicate biome getter in rmgen2. Reviewed By: Grugnas git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@20118 3db68df2-c116-0410-a063-a993310a9797 --- .../data/mods/public/gui/gamesetup/gamesetup.js | 16 +- binaries/data/mods/public/maps/random/harbor.js | 6 +- .../data/mods/public/maps/random/hells_pass.js | 6 +- binaries/data/mods/public/maps/random/lions_den.js | 12 +- .../data/mods/public/maps/random/rmgen2/gaia.js | 38 ++--- .../data/mods/public/maps/random/rmgen2/setup.js | 3 +- binaries/data/mods/public/maps/random/wild_lake.js | 173 ++++++++++----------- 7 files changed, 126 insertions(+), 128 deletions(-) diff --git a/binaries/data/mods/public/gui/gamesetup/gamesetup.js b/binaries/data/mods/public/gui/gamesetup/gamesetup.js index 3e76a0db7f..6d9364afc1 100644 --- a/binaries/data/mods/public/gui/gamesetup/gamesetup.js +++ b/binaries/data/mods/public/gui/gamesetup/gamesetup.js @@ -473,6 +473,7 @@ var g_Dropdowns = { "title": () => translate("Biome"), "tooltip": (hoverIdx) => translate("Select the flora and fauna."), "labels": () => g_BiomeList ? g_BiomeList.Title : [], + "colors": (idx) => g_BiomeList ? g_BiomeList.Color : [], "ids": () => g_BiomeList ? g_BiomeList.Id : [], "default": () => 0, "defined": () => g_GameAttributes.settings.Biome !== undefined, @@ -1499,8 +1500,14 @@ function reloadBiomeList() [{ "Id": "random", "Title": translateWithContext("biome", "Random"), - "Description": translate("Pick a biome at random.") - }].concat(biomeList)); + "Description": translate("Pick a biome at random."), + "Color": g_ColorRandom + }].concat(biomeList.map(biome => ({ + "Id": biome.Id, + "Title": biome.Title, + "Description": biome.Description, + "Color": g_ColorRegular + })))); initDropdown("biome"); } @@ -1866,7 +1873,10 @@ function launchGame() } if (g_GameAttributes.settings.Biome == "random") - g_GameAttributes.settings.Biome = pickRandom(g_GameAttributes.settings.SupportedBiomes); + g_GameAttributes.settings.Biome = pickRandom( + g_GameAttributes.settings.SupportedBiomes === true ? + g_BiomeList.Id : + g_GameAttributes.settings.SupportedBiomes); g_GameAttributes.settings.TriggerScripts = g_GameAttributes.settings.VictoryScripts.concat(g_GameAttributes.settings.TriggerScripts || []); diff --git a/binaries/data/mods/public/maps/random/harbor.js b/binaries/data/mods/public/maps/random/harbor.js index e7049697b8..9f89d8edc8 100644 --- a/binaries/data/mods/public/maps/random/harbor.js +++ b/binaries/data/mods/public/maps/random/harbor.js @@ -346,13 +346,13 @@ function addSpines() let spineTile = g_Terrains.dirt; let elevation = 35; - if (g_MapInfo.biome == 2) + if (currentBiome() == g_BiomeSnowy) spineTile = g_Terrains.tier1Terrain; - if (g_MapInfo.biome == 4 || g_MapInfo.biome == 6) + if (currentBiome() == g_BiomeAlpine || currentBiome() == g_BiomeSavanna) spineTile = g_Terrains.tier2Terrain; - if (g_MapInfo.biome == 8) + if (currentBiome() == g_BiomeAutumn) spineTile = g_Terrains.tier4Terrain; let split = 1; diff --git a/binaries/data/mods/public/maps/random/hells_pass.js b/binaries/data/mods/public/maps/random/hells_pass.js index ef92281dfc..d7b4c021b6 100644 --- a/binaries/data/mods/public/maps/random/hells_pass.js +++ b/binaries/data/mods/public/maps/random/hells_pass.js @@ -226,13 +226,13 @@ function placeBarriers() { var spineTerrain = g_Terrains.dirt; - if (g_MapInfo.biome == g_BiomeSnowy) + if (currentBiome() == g_BiomeSnowy) spineTerrain = g_Terrains.tier1Terrain; - if (g_MapInfo.biome == g_BiomeAlpine || g_MapInfo.biome == g_BiomeSavanna) + if (currentBiome() == g_BiomeAlpine || currentBiome() == g_BiomeSavanna) spineTerrain = g_Terrains.tier2Terrain; - if (g_MapInfo.biome == g_BiomeAutumn) + if (currentBiome() == g_BiomeAutumn) spineTerrain = g_Terrains.tier4Terrain; // create mountain ranges diff --git a/binaries/data/mods/public/maps/random/lions_den.js b/binaries/data/mods/public/maps/random/lions_den.js index 426fbfa223..da97cf8923 100644 --- a/binaries/data/mods/public/maps/random/lions_den.js +++ b/binaries/data/mods/public/maps/random/lions_den.js @@ -382,34 +382,34 @@ function createSunkenTerrain(players) var lower = g_Terrains.tier2Terrain; var road = g_Terrains.road; - if (g_MapInfo.biome == g_BiomeSnowy) + if (currentBiome() == g_BiomeSnowy) { middle = g_Terrains.tier2Terrain; lower = g_Terrains.tier1Terrain; } - if (g_MapInfo.biome == g_BiomeAlpine) + if (currentBiome() == g_BiomeAlpine) { middle = g_Terrains.shore; lower = g_Terrains.tier4Terrain; } - if (g_MapInfo.biome == g_BiomeMediterranean) + if (currentBiome() == g_BiomeMediterranean) { middle = g_Terrains.tier1Terrain; lower = g_Terrains.forestFloor1; } - if (g_MapInfo.biome == g_BiomeSavanna) + if (currentBiome() == g_BiomeSavanna) { middle = g_Terrains.tier2Terrain; lower = g_Terrains.tier4Terrain; } - if (g_MapInfo.biome == g_BiomeTropic || g_MapInfo.biome == g_BiomeAutumn) + if (currentBiome() == g_BiomeTropic || currentBiome() == g_BiomeAutumn) road = g_Terrains.roadWild; - if (g_MapInfo.biome == g_BiomeAutumn) + if (currentBiome() == g_BiomeAutumn) middle = g_Terrains.shore; var expSize = g_MapInfo.mapArea * 0.015 / (g_MapInfo.numPlayers / 4); diff --git a/binaries/data/mods/public/maps/random/rmgen2/gaia.js b/binaries/data/mods/public/maps/random/rmgen2/gaia.js index 82e5e22ee9..ea8be84616 100644 --- a/binaries/data/mods/public/maps/random/rmgen2/gaia.js +++ b/binaries/data/mods/public/maps/random/rmgen2/gaia.js @@ -25,10 +25,10 @@ function addBluffs(constraint, size, deviation, fill) var constrastTerrain = g_Terrains.tier2Terrain; - if (g_MapInfo.biome == g_BiomeTropic) + if (currentBiome() == g_BiomeTropic) constrastTerrain = g_Terrains.dirt; - if (g_MapInfo.biome == g_BiomeAutumn) + if (currentBiome() == g_BiomeAutumn) constrastTerrain = g_Terrains.tier3Terrain; var count = fill * scaleByMapSize(15, 15); @@ -243,7 +243,7 @@ function addBluffs(constraint, size, deviation, fill) } ])); - let savanna = g_MapInfo.biome == g_BiomeSavanna; + let savanna = currentBiome() == g_BiomeSavanna; addElements(shuffleArray([ { "func": addStragglerTrees, @@ -328,7 +328,7 @@ function addDecoration(constraint, size, deviation, fill) ]; var baseCount = 1; - if (g_MapInfo.biome == g_BiomeTropic) + if (currentBiome() == g_BiomeTropic) baseCount = 8; var counts = [ @@ -445,13 +445,13 @@ function addLakes(constraint, size, deviation, fill) { var lakeTile = g_Terrains.water; - if (g_MapInfo.biome == g_BiomeTemperate || g_MapInfo.biome == g_BiomeTropic) + if (currentBiome() == g_BiomeTemperate || currentBiome() == g_BiomeTropic) lakeTile = g_Terrains.dirt; - if (g_MapInfo.biome == g_BiomeMediterranean) + if (currentBiome() == g_BiomeMediterranean) lakeTile = g_Terrains.tier2Terrain; - if (g_MapInfo.biome == g_BiomeAutumn) + if (currentBiome() == g_BiomeAutumn) lakeTile = g_Terrains.shore; addElevation(constraint, { @@ -564,13 +564,13 @@ function addPlateaus(constraint, size, deviation, fill) { var plateauTile = g_Terrains.dirt; - if (g_MapInfo.biome == g_BiomeSnowy) + if (currentBiome() == g_BiomeSnowy) plateauTile = g_Terrains.tier1Terrain; - if (g_MapInfo.biome == g_BiomeAlpine || g_MapInfo.biome == g_BiomeSavanna) + if (currentBiome() == g_BiomeAlpine || currentBiome() == g_BiomeSavanna) plateauTile = g_Terrains.tier2Terrain; - if (g_MapInfo.biome == g_BiomeAutumn) + if (currentBiome() == g_BiomeAutumn) plateauTile = g_Terrains.tier4Terrain; addElevation(constraint, { @@ -701,25 +701,25 @@ function addValleys(constraint, size, deviation, fill) var valleySlope = g_Terrains.tier1Terrain; var valleyFloor = g_Terrains.tier4Terrain; - if (g_MapInfo.biome == g_BiomeDesert) + if (currentBiome() == g_BiomeDesert) { valleySlope = g_Terrains.tier3Terrain; valleyFloor = g_Terrains.dirt; } - if (g_MapInfo.biome == g_BiomeMediterranean) + if (currentBiome() == g_BiomeMediterranean) { valleySlope = g_Terrains.tier2Terrain; valleyFloor = g_Terrains.dirt; } - if (g_MapInfo.biome == g_BiomeAlpine || g_MapInfo.biome == g_BiomeSavanna) + if (currentBiome() == g_BiomeAlpine || currentBiome() == g_BiomeSavanna) valleyFloor = g_Terrains.tier2Terrain; - if (g_MapInfo.biome == g_BiomeTropic) + if (currentBiome() == g_BiomeTropic) valleySlope = g_Terrains.dirt; - if (g_MapInfo.biome == g_BiomeAutumn) + if (currentBiome() == g_BiomeAutumn) valleyFloor = g_Terrains.tier3Terrain; addElevation(constraint, { @@ -819,7 +819,7 @@ function addForests(constraint, size, deviation, fill) fill = fill || 1; // No forests for the african biome - if (g_MapInfo.biome == g_BiomeSavanna) + if (currentBiome() == g_BiomeSavanna) return; var types = [ @@ -923,7 +923,7 @@ function addStragglerTrees(constraint, size, deviation, fill) fill = fill || 1; // Ensure minimum distribution on african biome - if (g_MapInfo.biome == g_BiomeSavanna) + if (currentBiome() == g_BiomeSavanna) { fill = Math.max(fill, 2); size = Math.max(size, 1); @@ -945,7 +945,7 @@ function addStragglerTrees(constraint, size, deviation, fill) var maxDist = 5 * offset; // More trees for the african biome - if (g_MapInfo.biome == g_BiomeSavanna) + if (currentBiome() == g_BiomeSavanna) { min = 3 * offset; max = 5 * offset; @@ -958,7 +958,7 @@ function addStragglerTrees(constraint, size, deviation, fill) var treesMax = max; // Don't clump fruit trees - if (i == 2 && (g_MapInfo.biome == g_BiomeDesert || g_MapInfo.biome == g_BiomeMediterranean)) + if (i == 2 && (currentBiome() == g_BiomeDesert || currentBiome() == g_BiomeMediterranean)) treesMax = 1; min = Math.min(min, treesMax); diff --git a/binaries/data/mods/public/maps/random/rmgen2/setup.js b/binaries/data/mods/public/maps/random/rmgen2/setup.js index 528f78aa11..d6cf8fc4fb 100644 --- a/binaries/data/mods/public/maps/random/rmgen2/setup.js +++ b/binaries/data/mods/public/maps/random/rmgen2/setup.js @@ -237,7 +237,7 @@ function createBase(player, walls = true) ); // Create starting trees - var num = g_MapInfo.biome == g_BiomeSavanna ? 5 : 15; + var num = currentBiome() == g_BiomeSavanna ? 5 : 15; for (var tries = 0; tries < 10; ++tries) { var tAngle = randFloat(0, TWO_PI); @@ -652,7 +652,6 @@ function initMapSettings() let numPlayers = getNumPlayers(); g_MapInfo = { - "biome": g_BiomeID, "numPlayers": numPlayers, "teams": getTeams(numPlayers), "startAngle": randFloat(0, TWO_PI) diff --git a/binaries/data/mods/public/maps/random/wild_lake.js b/binaries/data/mods/public/maps/random/wild_lake.js index 5e47b5469c..11df70bed5 100644 --- a/binaries/data/mods/public/maps/random/wild_lake.js +++ b/binaries/data/mods/public/maps/random/wild_lake.js @@ -141,72 +141,70 @@ let wildLakeBiome = [ } ]; -// Mercenary camps -var mercenaryCampGuards = [ - // Temperate 1 mace - [ - { "Template" : "structures/merc_camp_egyptian" }, - { "Template" : "units/mace_infantry_javelinist_b", "Count" : 4 }, - { "Template" : "units/mace_cavalry_spearman_e", "Count" : 3 }, - { "Template" : "units/mace_infantry_archer_a", "Count" : 4 }, - { "Template" : "units/mace_champion_infantry_a", "Count" : 3 } - ], - // Snowy 2 brit - [ - { "Template" : "structures/ptol_mercenary_camp" }, - { "Template" : "units/brit_infantry_javelinist_b", "Count" : 4 }, - { "Template" : "units/brit_cavalry_swordsman_e", "Count" : 3 }, - { "Template" : "units/brit_infantry_slinger_a", "Count" : 4 }, - { "Template" : "units/brit_champion_infantry", "Count" : 3 } - ], - // Desert 3 pers - [ - { "Template" : "structures/ptol_mercenary_camp" }, - { "Template" : "units/pers_infantry_javelinist_b", "Count" : 4 }, - { "Template" : "units/pers_cavalry_swordsman_e", "Count" : 3 }, - { "Template" : "units/pers_infantry_archer_a", "Count" : 4 }, - { "Template" : "units/pers_champion_infantry", "Count" : 3 } - ], - // Alpine 4 rome - [ - { "Template" : "structures/ptol_mercenary_camp" }, - { "Template" : "units/rome_infantry_swordsman_b", "Count" : 4 }, - { "Template" : "units/rome_cavalry_spearman_e", "Count" : 3 }, - { "Template" : "units/rome_infantry_javelinist_a", "Count" : 4 }, - { "Template" : "units/rome_champion_infantry", "Count" : 3 } - ], - // Mediterranean 5 iber - [ - { "Template" : "structures/merc_camp_egyptian" }, - { "Template" : "units/iber_infantry_javelinist_b", "Count" : 4 }, - { "Template" : "units/iber_cavalry_spearman_e", "Count" : 3 }, - { "Template" : "units/iber_infantry_slinger_a", "Count" : 4 }, - { "Template" : "units/iber_champion_infantry", "Count" : 3 } - ], - // Savanna 6 sele - [ - { "Template" : "structures/merc_camp_egyptian" }, - { "Template" : "units/sele_infantry_javelinist_b", "Count" : 4 }, - { "Template" : "units/sele_cavalry_spearman_merc_e", "Count" : 3 }, - { "Template" : "units/sele_infantry_spearman_a", "Count" : 4 }, - { "Template" : "units/sele_champion_infantry_swordsman", "Count" : 3 } - ], - // Tropic 7 ptol - [ - { "Template" : "structures/merc_camp_egyptian" }, - { "Template" : "units/ptol_infantry_javelinist_b", "Count" : 4 }, - { "Template" : "units/ptol_cavalry_archer_e", "Count" : 3 }, - { "Template" : "units/ptol_infantry_slinger_a", "Count" : 4 }, - { "Template" : "units/ptol_champion_infantry_pikeman", "Count" : 3 } - ], - // Autumn 8 gaul - [ - { "Template" : "structures/ptol_mercenary_camp" }, - { "Template" : "units/gaul_infantry_javelinist_b", "Count" : 4 }, - { "Template" : "units/gaul_cavalry_swordsman_e", "Count" : 3 }, - { "Template" : "units/gaul_infantry_slinger_a", "Count" : 4 }, - { "Template" : "units/gaul_champion_infantry", "Count" : 3 } - ] +var mercenaryCampGuards = {}; + +mercenaryCampGuards[g_BiomeTemperate] = [ + { "Template" : "structures/merc_camp_egyptian" }, + { "Template" : "units/mace_infantry_javelinist_b", "Count" : 4 }, + { "Template" : "units/mace_cavalry_spearman_e", "Count" : 3 }, + { "Template" : "units/mace_infantry_archer_a", "Count" : 4 }, + { "Template" : "units/mace_champion_infantry_a", "Count" : 3 } +]; + +mercenaryCampGuards[g_BiomeSnowy] = [ + { "Template" : "structures/ptol_mercenary_camp" }, + { "Template" : "units/brit_infantry_javelinist_b", "Count" : 4 }, + { "Template" : "units/brit_cavalry_swordsman_e", "Count" : 3 }, + { "Template" : "units/brit_infantry_slinger_a", "Count" : 4 }, + { "Template" : "units/brit_champion_infantry", "Count" : 3 } +]; + +mercenaryCampGuards[g_BiomeDesert] = [ + { "Template" : "structures/ptol_mercenary_camp" }, + { "Template" : "units/pers_infantry_javelinist_b", "Count" : 4 }, + { "Template" : "units/pers_cavalry_swordsman_e", "Count" : 3 }, + { "Template" : "units/pers_infantry_archer_a", "Count" : 4 }, + { "Template" : "units/pers_champion_infantry", "Count" : 3 } +]; + +mercenaryCampGuards[g_BiomeAlpine] = [ + { "Template" : "structures/ptol_mercenary_camp" }, + { "Template" : "units/rome_infantry_swordsman_b", "Count" : 4 }, + { "Template" : "units/rome_cavalry_spearman_e", "Count" : 3 }, + { "Template" : "units/rome_infantry_javelinist_a", "Count" : 4 }, + { "Template" : "units/rome_champion_infantry", "Count" : 3 } +]; + +mercenaryCampGuards[g_BiomeMediterranean] = [ + { "Template" : "structures/merc_camp_egyptian" }, + { "Template" : "units/iber_infantry_javelinist_b", "Count" : 4 }, + { "Template" : "units/iber_cavalry_spearman_e", "Count" : 3 }, + { "Template" : "units/iber_infantry_slinger_a", "Count" : 4 }, + { "Template" : "units/iber_champion_infantry", "Count" : 3 } +]; + +mercenaryCampGuards[g_BiomeSavanna] = [ + { "Template" : "structures/merc_camp_egyptian" }, + { "Template" : "units/sele_infantry_javelinist_b", "Count" : 4 }, + { "Template" : "units/sele_cavalry_spearman_merc_e", "Count" : 3 }, + { "Template" : "units/sele_infantry_spearman_a", "Count" : 4 }, + { "Template" : "units/sele_champion_infantry_swordsman", "Count" : 3 } +]; + +mercenaryCampGuards[g_BiomeTropic] = [ + { "Template" : "structures/merc_camp_egyptian" }, + { "Template" : "units/ptol_infantry_javelinist_b", "Count" : 4 }, + { "Template" : "units/ptol_cavalry_archer_e", "Count" : 3 }, + { "Template" : "units/ptol_infantry_slinger_a", "Count" : 4 }, + { "Template" : "units/ptol_champion_infantry_pikeman", "Count" : 3 } +]; + +mercenaryCampGuards[g_BiomeAutumn] = [ + { "Template" : "structures/ptol_mercenary_camp" }, + { "Template" : "units/gaul_infantry_javelinist_b", "Count" : 4 }, + { "Template" : "units/gaul_cavalry_swordsman_e", "Count" : 3 }, + { "Template" : "units/gaul_infantry_slinger_a", "Count" : 4 }, + { "Template" : "units/gaul_champion_infantry", "Count" : 3 } ]; /** @@ -268,29 +266,21 @@ function placeGrove(point, } } -// Food, fences with domestic animals -let farmEntities = [ - // Temperate 1 mace - { "building" : "structures/mace_farmstead", "animal" : "gaia/fauna_pig" }, - // Snowy 2 brit - { "building" : "structures/brit_farmstead", "animal" : "gaia/fauna_sheep" }, - // Desert 3 pers - { "building" : "structures/pers_farmstead", "animal" : "gaia/fauna_camel" }, - // Alpine 4 rome - { "building" : "structures/rome_farmstead", "animal" : "gaia/fauna_sheep" }, - // Mediterranean 5 iber - { "building" : "structures/iber_farmstead", "animal" : "gaia/fauna_pig" }, - // Savanna 6 sele - { "building" : "structures/sele_farmstead", "animal" : "gaia/fauna_horse" }, - // Tropic 7 ptol - { "building" : "structures/ptol_farmstead", "animal" : "gaia/fauna_camel" }, - // Autumn 8 gaul - { "building" : "structures/gaul_farmstead", "animal" : "gaia/fauna_horse" } -]; -wallStyles.other.sheepIn = new WallElement("sheepIn", farmEntities[g_BiomeID - 1].animal, PI / 4, -1.5, 0.75, PI/2); +var farmEntities = {}; + +farmEntities[g_BiomeTemperate] = { "building": "structures/mace_farmstead", "animal": "gaia/fauna_pig" }; +farmEntities[g_BiomeSnowy] = { "building": "structures/brit_farmstead", "animal": "gaia/fauna_sheep" }; +farmEntities[g_BiomeDesert] = { "building": "structures/pers_farmstead", "animal": "gaia/fauna_camel" }; +farmEntities[g_BiomeAlpine] = { "building": "structures/rome_farmstead", "animal": "gaia/fauna_sheep" }; +farmEntities[g_BiomeMediterranean] = { "building": "structures/iber_farmstead", "animal": "gaia/fauna_pig" }; +farmEntities[g_BiomeSavanna] = { "building": "structures/sele_farmstead", "animal": "gaia/fauna_horse" }; +farmEntities[g_BiomeTropic] = { "building": "structures/ptol_farmstead", "animal": "gaia/fauna_camel" }; +farmEntities[g_BiomeAutumn] = { "building": "structures/gaul_farmstead", "animal": "gaia/fauna_horse" }; + +wallStyles.other.sheepIn = new WallElement("sheepIn", farmEntities[currentBiome()].animal, PI / 4, -1.5, 0.75, PI/2); wallStyles.other.foodBin = new WallElement("foodBin", "gaia/special_treasure_food_bin", PI/2, 1.5); -wallStyles.other.sheep = new WallElement("sheep", farmEntities[g_BiomeID - 1].animal, 0, 0, 0.75); -wallStyles.other.farm = new WallElement("farm", farmEntities[g_BiomeID - 1].building, PI, 0, -3); +wallStyles.other.sheep = new WallElement("sheep", farmEntities[currentBiome()].animal, 0, 0, 0.75); +wallStyles.other.farm = new WallElement("farm", farmEntities[currentBiome()].building, PI, 0, -3); let fences = [ new Fortress("fence", ["foodBin", "farm", "bench", "sheepIn", "fence", "sheepIn", "fence", "sheepIn", "fence"]), new Fortress("fence", ["foodBin", "farm", "fence", "sheepIn", "fence", "sheepIn", "bench", "sheep", "fence", "sheepIn", "fence"]), @@ -347,7 +337,7 @@ function placeStartLocationResources( { function getRandDist() { - return averageDistToCC + randFloat(-dAverageDistToCC, dAverageDistToCC) + return averageDistToCC + randFloat(-dAverageDistToCC, dAverageDistToCC); } let currentAngle = randFloat(0, TWO_PI); @@ -411,7 +401,6 @@ setWaterHeight(waterHeight); // Generate base terrain shape let lowH = heightRange.min; let medH = (heightRange.min + heightRange.max) / 2; -let higH = heightRange.max; // Lake let initialHeightmap = [ @@ -630,7 +619,7 @@ for (let h = 0; h < heighLimits.length; ++h) { let x = areas[h][t].x; let y = areas[h][t].y; - let actor = undefined; + let actor; let texture = pickRandom(wildLakeBiome[h].texture); if (slopeMap[x][y] < 0.5 * (minSlope[h] + maxSlope[h])) @@ -696,7 +685,7 @@ for (let i = 0; i < resourceSpots.length; ++i) { if (mercenaryCamps) { - createStartingPlayerEntities(resourceSpots[i].x, resourceSpots[i].y, 0, mercenaryCampGuards[g_BiomeID - 1]); + createStartingPlayerEntities(resourceSpots[i].x, resourceSpots[i].y, 0, mercenaryCampGuards[currentBiome()]); rectangularSmoothToHeight(resourceSpots[i], 15, 15, g_Map.height[resourceSpots[i].x][resourceSpots[i].y], 0.5); --mercenaryCamps; } -- 2.11.4.GIT