From 9833b1da7e67d3041c98bd273add09704e2ce580 Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:10:38 -0700 Subject: [PATCH] [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 --- src/data/biomes.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/data/biomes.ts b/src/data/biomes.ts index 2cdb29a94ec..3879053b066 100644 --- a/src/data/biomes.ts +++ b/src/data/biomes.ts @@ -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 ];