Browse Source

Merge pull request 'don't crash if min and max meseta is the same' (#184) from min_max_meseta into master

Reviewed-by: jake <jake@sharnoth.com>
pbs
jake 5 years ago
parent
commit
035c58ac06
  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