well, I converted Biomes to have a class instead of a series of arrays. Limited testing has been done but it works

This commit is contained in:
Zoltan 2019-11-09 01:48:01 -08:00
parent 7a06e0bdd4
commit d9df7c2f15
10 changed files with 144 additions and 96 deletions

View file

@ -293,9 +293,9 @@
function getBiomeCost(b, biome, type) {
if (b === biome) return 10; // tiny penalty for native biome
if (type === "Hunting") return biomesData.cost[biome] * 2; // non-native biome penalty for hunters
if (type === "Nomadic" && biome > 4 && biome < 10) return biomesData.cost[biome] * 3; // forest biome penalty for nomads
return biomesData.cost[biome]; // general non-native biome penalty
if (type === "Hunting") return biomesData.biomeList[biome].cost * 2; // non-native biome penalty for hunters
if (type === "Nomadic" && biome > 4 && biome < 10) return biomesData.biomeList[biome].cost * 3; // forest biome penalty for nomads
return biomesData.biomeList[biome].cost; // general non-native biome penalty
}
function getHeightCost(f, h, type) {