diff --git a/src/content/floatingIslandsWorldGen.ts b/src/content/floatingIslandsWorldGen.ts index b797261..81443b3 100644 --- a/src/content/floatingIslandsWorldGen.ts +++ b/src/content/floatingIslandsWorldGen.ts @@ -334,6 +334,7 @@ export class FloatingIslandsWorldGen extends WorldGen { preGen(world: World) { const lcg = new LCG(world.seed); + world.bottomOfTheWorld = 800; this.islandStep(world, lcg, 1000, 1000, 1000, 50, 0); } diff --git a/src/world/entity/character.ts b/src/world/entity/character.ts index e9e04b5..a2a9eff 100644 --- a/src/world/entity/character.ts +++ b/src/world/entity/character.ts @@ -240,7 +240,7 @@ export class Character extends Being { return; } - if (this.y < 800) { + if (this.y < this.world.bottomOfTheWorld) { this.die(); } diff --git a/src/world/world.ts b/src/world/world.ts index 1e56327..51da654 100644 --- a/src/world/world.ts +++ b/src/world/world.ts @@ -26,6 +26,7 @@ export class World { blocks: BlockType[] = []; blockTextureUrl = ""; worldgenHandler?: WorldGen; + bottomOfTheWorld = 0; constructor(game: Game) { this.seed = 1234;