[Balance] Randomized Biome after End Biome (#3888)
* Biome.END goes somewhere random * this way island is included too * no towns or plains * Enums are dumb --------- Co-authored-by: frutescens <info@laptop>
This commit is contained in:
parent
db9434ac11
commit
9833b1da7e
|
@ -7663,6 +7663,12 @@ export function initBiomes() {
|
|||
biomeDepths[Biome.TOWN] = [ 0, 1 ];
|
||||
|
||||
const traverseBiome = (biome: Biome, depth: integer) => {
|
||||
if (biome === Biome.END) {
|
||||
const biomeList = Object.keys(Biome).filter(key => !isNaN(Number(key)));
|
||||
biomeList.pop(); // Removes Biome.END from the list
|
||||
const randIndex = Utils.randInt(biomeList.length, 2); // Will never be Biome.TOWN or Biome.PLAINS
|
||||
biome = Biome[biomeList[randIndex]];
|
||||
}
|
||||
const linkedBiomes: (Biome | [ Biome, integer ])[] = Array.isArray(biomeLinks[biome])
|
||||
? biomeLinks[biome] as (Biome | [ Biome, integer ])[]
|
||||
: [ biomeLinks[biome] as Biome ];
|
||||
|
|
Loading…
Reference in New Issue