v2.5.0: fixed terror expiry setting AI state even if not fleeing

This commit is contained in:
Evan Debenham
2024-09-01 14:10:38 -04:00
parent 370b65d6b2
commit 0d5d505038

View File

@@ -440,8 +440,8 @@ public abstract class Mob extends Char {
@Override
public boolean remove( Buff buff ) {
if (super.remove( buff )) {
if ((buff instanceof Terror && buff(Dread.class) == null)
|| (buff instanceof Dread && buff(Terror.class) == null)) {
if (state == FLEEING && ((buff instanceof Terror && buff(Dread.class) == null)
|| (buff instanceof Dread && buff(Terror.class) == null))) {
if (enemySeen) {
sprite.showStatus(CharSprite.WARNING, Messages.get(this, "rage"));
state = HUNTING;