From 8700987986e1c99cafdc9e4dc38dd53e71f84c33 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 19 Oct 2022 17:41:04 -0600 Subject: [PATCH] actually this can be simplified --- src/ship/map/enemy.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ship/map/enemy.rs b/src/ship/map/enemy.rs index 70964a1..0903c57 100644 --- a/src/ship/map/enemy.rs +++ b/src/ship/map/enemy.rs @@ -99,10 +99,7 @@ impl RareMonsterAppearTable { } pub fn roll_is_rare(&self, monster: &MonsterType) -> bool { - if rand_chacha::ChaChaRng::from_entropy().gen::() < *self.appear_rate.get(monster).unwrap_or(&0.0f32) { - return true - } - false + rand_chacha::ChaChaRng::from_entropy().gen::() < *self.appear_rate.get(monster).unwrap_or(&0.0f32) } }