fixed room gen bug (disconnected rooms)
This commit is contained in:
parent
c6639b7616
commit
8462eab0bd
2 changed files with 4 additions and 4 deletions
|
|
@ -148,10 +148,10 @@ impl Map {
|
|||
let (prev_x, prev_y) = map.rooms[map.rooms.len() - 1].centre();
|
||||
if rng.range(0, 2) == 1 {
|
||||
map.apply_horizontal_tunnel(prev_x, new_x, prev_y);
|
||||
map.apply_vertical_tunnel(prev_y, new_y, prev_x);
|
||||
map.apply_vertical_tunnel(prev_y, new_y, new_x);
|
||||
} else {
|
||||
map.apply_vertical_tunnel(prev_y, new_y, prev_x);
|
||||
map.apply_horizontal_tunnel(prev_x, new_x, prev_y);
|
||||
map.apply_horizontal_tunnel(prev_x, new_x, new_y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -137,8 +137,8 @@ fn room_table(map_depth: i32) -> RandomTable {
|
|||
.add("fireball scroll", 1 + map_depth)
|
||||
.add("confusion scroll", 1)
|
||||
.add("magic missile scroll", 4)
|
||||
.add("magic map scroll", 400)
|
||||
.add("cursed magic map scroll", 400);
|
||||
.add("magic map scroll", 1)
|
||||
.add("cursed magic map scroll", 1);
|
||||
}
|
||||
|
||||
fn health_potion(ecs: &mut World, x: i32, y: i32) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue