diff --git a/src/level_generator.rs b/src/level_generator.rs index 1a80d1f..0df65ed 100644 --- a/src/level_generator.rs +++ b/src/level_generator.rs @@ -24,7 +24,7 @@ enum RoomType { StairUp, StairDown, BasicRoom, - TreasureRoom, + ArtifactRoom, MonsterRoom, EmptyRoom, } @@ -105,13 +105,13 @@ impl LevelGenerator { room_types.push(RoomType::StairDown); } room_types.push(RoomType::MonsterRoom); - room_types.push(RoomType::TreasureRoom); + room_types.push(RoomType::ArtifactRoom); // generate a random set of rooms and shuffle them for _ in room_types.len()..ROOMS_HORIZONTAL * ROOMS_VERTICAL { match rng.gen_range(1..=100) { // TODO tune room type distribution 1..=33 => room_types.push(RoomType::EmptyRoom), - 34..=66 => room_types.push(RoomType::TreasureRoom), + 34..=66 => room_types.push(RoomType::ArtifactRoom), 67..=90 => room_types.push(RoomType::MonsterRoom), _ => room_types.push(RoomType::BasicRoom), } @@ -298,7 +298,7 @@ impl LevelGenerator { StructureElement::Floor; } } - if room.kind == RoomType::TreasureRoom { + if room.kind == RoomType::ArtifactRoom { let t_x = left + room.offset_x + rng.gen_range(0..room.width); let t_y = top + room.offset_y + rng.gen_range(0..room.height); // TODO randomize artifacts