v0.6.2: fixed magical sleep not detaching when ai state is assigned
This commit is contained in:
+4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user