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

@ -392,9 +392,9 @@
function getBiomeCost(c, biome, type) {
if (cells.biome[pack.cultures[c].center] === biome) return 10; // tiny penalty for native biome
if (type === "Hunting") return biomesData.cost[biome] * 5; // non-native biome penalty for hunters
if (type === "Nomadic" && biome > 4 && biome < 10) return biomesData.cost[biome] * 10; // forest biome penalty for nomads
return biomesData.cost[biome] * 2; // general non-native biome penalty
if (type === "Hunting") return biomesData.biomeList[biome].cost * 5; // non-native biome penalty for hunters
if (type === "Nomadic" && biome > 4 && biome < 10) return biomesData.biomeList[biome].cost * 10; // forest biome penalty for nomads
return biomesData.biomeList[biome].cost * 2; // general non-native biome penalty
}
function getHeightCost(i, h, type) {