v0.3.1: refactored resting based on new functionality. Hitting full HP now interrupts resting.

This commit is contained in:
Evan Debenham
2015-07-15 14:59:17 -04:00
parent 0a6c9c6e7f
commit 18e488c63e
7 changed files with 22 additions and 17 deletions
@@ -58,7 +58,7 @@ public class MagicalSleep extends Buff {
public boolean act(){
if (target instanceof Hero) {
target.HP = Math.min(target.HP+1, target.HT);
((Hero) target).restoreHealth = true;
((Hero) target).resting = true;
if (target.HP == target.HT) {
GLog.p("You wake up feeling refreshed and healthy.");
detach();
@@ -72,7 +72,7 @@ public class MagicalSleep extends Buff {
public void detach() {
target.paralysed = false;
if (target instanceof Hero)
((Hero) target).restoreHealth = false;
((Hero) target).resting = false;
super.detach();
}