From 6bb0c70c07c67e0c847dc308b22e9a1475c966a9 Mon Sep 17 00:00:00 2001 From: atomicint Date: Wed, 3 Feb 2016 19:21:53 -0500 Subject: [PATCH] Fixed "It heals some health" food consumable message. --- data/plugins/consumables/food.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/plugins/consumables/food.rb b/data/plugins/consumables/food.rb index 659cf5aa..f9c7017f 100644 --- a/data/plugins/consumables/food.rb +++ b/data/plugins/consumables/food.rb @@ -22,12 +22,13 @@ class Food < Consumable # Restore the appropriate amount of hitpoints when consumed. def consume(player) hitpoints = player.skill_set.skill(Skill::HITPOINTS) + hitpoints_current = player.skill_set.get_current_level(Skill::HITPOINTS) new_curr = [hitpoints.current_level + @restoration, hitpoints.maximum_level].min player.inventory.add(@replace) unless @replace == -1 player.send_message("You eat the #{name}.", true) - player.send_message('It heals some health.', true) if new_curr == hitpoints + player.send_message('It heals some health.', true) if new_curr > hitpoints_current skill = Skill.new(hitpoints.experience, new_curr, hitpoints.maximum_level) player.skill_set.set_skill(Skill::HITPOINTS, skill)