mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
no wetlands in elevated areas
This commit is contained in:
parent
e42bc58bd1
commit
7865497cd2
1 changed files with 1 additions and 1 deletions
2
main.js
2
main.js
|
|
@ -1417,7 +1417,7 @@ function defineBiomes() {
|
|||
function getBiomeId(moisture, temperature, height) {
|
||||
if (height < 20) return 0; // marine biome: all water cells
|
||||
if (temperature < -5) return 11; // permafrost biome
|
||||
if (moisture > 40 && temperature > -2 && (height < 25 || (moisture > 24 && height > 24))) return 12; // wetland biome
|
||||
if (moisture > 40 && temperature > -2 && (height < 25 || (moisture > 24 && height > 24 && height < 60))) return 12; // wetland biome
|
||||
|
||||
const moistureBand = Math.min((moisture / 5) | 0, 4); // [0-4]
|
||||
const temperatureBand = Math.min(Math.max(20 - temperature, 0), 25); // [0-25]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue