m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/hex_engine.rb
diff options
context:
space:
mode:
Diffstat (limited to 'hex_engine.rb')
-rw-r--r--hex_engine.rb20
1 files changed, 2 insertions, 18 deletions
diff --git a/hex_engine.rb b/hex_engine.rb
index 3f3dbbc..34b80b6 100644
--- a/hex_engine.rb
+++ b/hex_engine.rb
@@ -118,25 +118,9 @@ class Hex < Engine
@messages.push(message)
end
- def update_with_bonus current, update, bonus
- if update < 0
- current + [update + bonus, 0].min
- else
- current + update
- end
- end
-
- def update_health health
- @health = update_with_bonus @health, health, @magic_armor
- end
-
- def update_endurance endurance
- @endurance = update_with_bonus @endurance, endurance, @magic_weapon
- end
-
def update_hex health, endurance, xp
- update_health health
- update_endurance endurance
+ @health += health
+ @endurance += endurance
@xp += xp
end