mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 16:51:37 +00:00
Cleanup.
This commit is contained in:
@@ -19,8 +19,7 @@ class Food < Consumable
|
||||
# Restore the appropriate amount of hitpoints when consumed.
|
||||
def consume(player)
|
||||
hitpoints = player.skill_set.skill(HITPOINTS_SKILL_ID)
|
||||
new_curr = hitpoints.current_level + @restoration
|
||||
new_curr = hitpoints.maximum_level if new_curr > hitpoints.maximum_level
|
||||
new_curr = [ hitpoints.current_level + @restoration, hitpoints.maximum_level ].min
|
||||
|
||||
player.skill_set.set_skill(HITPOINTS_SKILL_ID, Skill.new(hitpoints.experience, new_curr, hitpoints.maximum_level))
|
||||
player.send_message("You eat the #{name}.", true)
|
||||
|
||||
Reference in New Issue
Block a user