diff options
author | David Gay <david@davidgay.org> | 2021-06-09 21:00:52 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-09 21:00:52 -0400 |
commit | 8706abf4fb1dc0de779befebe613606fafcf8498 (patch) | |
tree | 2a3bb20572b4d5742eb3102450da861c34c38365 | |
parent | fa45549c2fbbedb923ddf85df5e65d5c63269a1d (diff) |
Fix bug where monster spawn item award code could fail to check all items
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | app/models/monster_spawn_combat.rb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index be7079f..fb412ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ All notable changes to this project will be documented in this file. - Accuracy 25 -> 23 - Power 40 -> 30 - Claw length 1' -> 2' + +### Fixed +- Leviathans that had item drops with a less than 100% chance could fail to check all their items due to the awarding + code returning early. This wouldn't have happened in the game yet because prior to this patch there were no item + drops on leviathans with less than 100% drop chance. ## [0.1.9.1] - 2021-06-07 diff --git a/app/models/monster_spawn_combat.rb b/app/models/monster_spawn_combat.rb index 8dbd8e8..f15f339 100644 --- a/app/models/monster_spawn_combat.rb +++ b/app/models/monster_spawn_combat.rb @@ -27,7 +27,7 @@ class MonsterSpawnCombat < ApplicationRecord message_body_parts[character.id].push("You got #{total_xp} #{Skill.find_by_gid(data[:gid]).name} XP") end when "item" - return if rand > (data[:chance] || 1) + next if rand > (data[:chance] || 1) if data[:table] table_roll = rand |