v0.6.2: fixed magical sleep not detaching when ai state is assigned
This commit is contained in:
parent
6d8e64d5bd
commit
495a3cdb4b
|
@ -57,6 +57,10 @@ public class MagicalSleep extends Buff {
|
|||
|
||||
@Override
|
||||
public boolean act(){
|
||||
if (target instanceof Mob && ((Mob) target).state != ((Mob) target).SLEEPING){
|
||||
detach();
|
||||
return true;
|
||||
}
|
||||
if (target instanceof Hero) {
|
||||
target.HP = Math.min(target.HP+1, target.HT);
|
||||
((Hero) target).resting = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user