Browse Source

don't crash if min and max meseta is the same

pbs
Andy Newjack 4 years ago
parent
commit
35a4b190b7
  1. 2
      src/ship/drops/mod.rs

2
src/ship/drops/mod.rs

@ -131,7 +131,7 @@ impl<R: Rng + SeedableRng> DropTable<R> {
}
fn generate_meseta(&mut self, monster: &MonsterDropStats) -> Option<ItemDropType> {
Some(ItemDropType::Meseta(self.rng.gen_range(monster.min_meseta, monster.max_meseta)))
Some(ItemDropType::Meseta(self.rng.gen_range(monster.min_meseta, monster.max_meseta + 1)))
}
fn generate_typed_drop(&mut self, map_area: &MapArea, monster: &MonsterDropStats) -> Option<ItemDropType> {

Loading…
Cancel
Save