From dab84738d91e5a6b20132d1ba00de6ba8ecc3d8a Mon Sep 17 00:00:00 2001 From: Charles Peyrat Date: Fri, 8 Jan 2021 15:18:13 +0100 Subject: [PATCH] Remove the starting room door only if it really shouldn't be here; also account for the new randomized placement in removing lone door tile --- squirrelbattle/mapgeneration/broguelike.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/squirrelbattle/mapgeneration/broguelike.py b/squirrelbattle/mapgeneration/broguelike.py index 02fc736..59cbaeb 100644 --- a/squirrelbattle/mapgeneration/broguelike.py +++ b/squirrelbattle/mapgeneration/broguelike.py @@ -162,7 +162,8 @@ class Generator: dim_v, dim_h = len(starting_room), len(starting_room[0]) pos_y, pos_x = randint(0, height-dim_v-1), randint(0, width-dim_h-1) self.place_room(level, pos_y, pos_x, starting_room, 0, 0) - level[0][0] = Tile.EMPTY + if starting_room[0][0] != Tile.FLOOR: + level[pos_y][pos_x] = Tile.EMPTY self.params["corridor_chance"] = mem # find a starting position