mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
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:
parent
7a06e0bdd4
commit
d9df7c2f15
10 changed files with 144 additions and 96 deletions
|
|
@ -212,7 +212,7 @@
|
|||
|
||||
const cultureCost = c !== cells.culture[e] ? 10 : 0;
|
||||
const stateCost = s !== cells.state[e] ? 10 : 0;
|
||||
const biomeCost = cells.road[e] ? 1 : biomesData.cost[cells.biome[e]];
|
||||
const biomeCost = cells.road[e] ? 1 : biomesData.biomeList[cells.biome[e]].cost;
|
||||
const populationCost = Math.max(rn(popCost - cells.pop[e]), 0);
|
||||
const heightCost = Math.max(cells.h[e], 20) - 20;
|
||||
const waterCost = cells.h[e] < 20 ? cells.road[e] ? 50 : 1000 : 0;
|
||||
|
|
@ -248,7 +248,7 @@
|
|||
|
||||
cells.c[n].forEach(function(e) {
|
||||
const religionCost = cells.religion[e] === b ? 0 : 2000;
|
||||
const biomeCost = cells.road[e] ? 0 : biomesData.cost[cells.biome[e]];
|
||||
const biomeCost = cells.road[e] ? 0 : biomesData.biomeList[cells.biome[e]].cost;
|
||||
const heightCost = Math.max(cells.h[e], 20) - 20;
|
||||
const waterCost = cells.h[e] < 20 ? cells.road[e] ? 50 : 1000 : 0;
|
||||
const totalCost = p + (religionCost + biomeCost + heightCost + waterCost) / Math.max(religions[r].expansionism, .1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue