v3.1.0: fixed magical sleep not cancelling sleep state on allies
This commit is contained in:
@@ -43,6 +43,7 @@ public class MagicalSleep extends Buff {
|
||||
if (target.HP == target.HT) {
|
||||
if (target instanceof Hero) GLog.i(Messages.get(this, "toohealthy"));
|
||||
detach();
|
||||
return true;
|
||||
} else {
|
||||
if (target instanceof Hero) GLog.i(Messages.get(this, "fallasleep"));
|
||||
}
|
||||
@@ -78,10 +79,14 @@ public class MagicalSleep extends Buff {
|
||||
|
||||
@Override
|
||||
public void detach() {
|
||||
if (target.paralysed > 0)
|
||||
if (target.paralysed > 0) {
|
||||
target.paralysed--;
|
||||
if (target instanceof Hero)
|
||||
}
|
||||
if (target instanceof Hero) {
|
||||
((Hero) target).resting = false;
|
||||
} else if (target instanceof Mob && target.alignment == Char.Alignment.ALLY && ((Mob) target).state == ((Mob) target).SLEEPING){
|
||||
((Mob) target).state = ((Mob) target).WANDERING;
|
||||
}
|
||||
super.detach();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user