v0.3.1b: refactored paralysis, now works properly when there are multiple paralysis sources

This commit is contained in:
Evan Debenham
2015-09-03 19:06:14 -04:00
parent 7f5e4a8d22
commit 9c861427e3
8 changed files with 17 additions and 23 deletions
@@ -46,7 +46,7 @@ public class MagicalSleep extends Buff {
else if (target instanceof Mob)
((Mob)target).state = ((Mob)target).SLEEPING;
target.paralysed = true;
target.paralysed++;
return true;
} else {
@@ -70,7 +70,8 @@ public class MagicalSleep extends Buff {
@Override
public void detach() {
target.paralysed = false;
if (target.paralysed > 0)
target.paralysed--;
if (target instanceof Hero)
((Hero) target).resting = false;
super.detach();