fix monster percentage

This commit is contained in:
Joachim Lusiardi 2024-10-27 06:24:40 +01:00
parent 1ae7ff45ab
commit 74831857cf
1 changed files with 2 additions and 2 deletions

View File

@ -29,13 +29,13 @@ pub const LEVEL_WIDTH: usize = 1 + ROOMS_VERTICAL * ROOM_WIDTH;
pub const LEVEL_HEIGHT: usize = 1 + ROOMS_HORIZONTAL * ROOM_HEIGHT; pub const LEVEL_HEIGHT: usize = 1 + ROOMS_HORIZONTAL * ROOM_HEIGHT;
pub fn get_monsters_per_level() -> Vec<HashMap<MonsterTypes, std::ops::RangeInclusive<u8>>> { pub fn get_monsters_per_level() -> Vec<HashMap<MonsterTypes, std::ops::RangeInclusive<u8>>> {
let tmp = vec![ let tmp =[
// level 1 // level 1
vec![(MonsterTypes::Rat, 50), (MonsterTypes::Spider, 50)], vec![(MonsterTypes::Rat, 50), (MonsterTypes::Spider, 50)],
// level 2 // level 2
vec![(MonsterTypes::Rat, 50), (MonsterTypes::Snake, 50)], vec![(MonsterTypes::Rat, 50), (MonsterTypes::Snake, 50)],
// level 3 // level 3
vec![(MonsterTypes::Orc, 33), (MonsterTypes::Skeleton, 33), (MonsterTypes::Snake, 33)], vec![(MonsterTypes::Orc, 34), (MonsterTypes::Skeleton, 33), (MonsterTypes::Snake, 33)],
]; ];
if tmp.len() != LEVELS { if tmp.len() != LEVELS {
panic!("Only {} monster sets defined for {} levels!", tmp.len(), LEVELS); panic!("Only {} monster sets defined for {} levels!", tmp.len(), LEVELS);