v2.0.0: fixed feint not redirecting aggro in some cases

This commit is contained in:
Evan Debenham
2023-03-06 13:33:01 -05:00
parent 6a62d54d0f
commit 70469168e0
2 changed files with 2 additions and 7 deletions

View File

@@ -53,7 +53,7 @@ import com.watabou.utils.Callback;
public class Feint extends ArmorAbility {
{
baseChargeUse = 50;
baseChargeUse = 0;
}
@Override
@@ -126,7 +126,7 @@ public class Feint extends ArmorAbility {
});
for (Mob m : Dungeon.level.mobs.toArray( new Mob[0] )){
if (m.focusingHero() ||
if ((m.isTargeting(hero) && m.state == m.HUNTING) ||
(m.alignment == Char.Alignment.ENEMY && m.state != m.PASSIVE && Dungeon.level.distance(m.pos, image.pos) <= 2)){
m.aggro(image);
}

View File

@@ -928,11 +928,6 @@ public abstract class Mob extends Char {
GLog.n( "%s: \"%s\" ", Messages.titleCase(name()), str );
}
//returns true when a mob sees the hero, and is currently targeting them.
public boolean focusingHero() {
return enemySeen && (target == Dungeon.hero.pos);
}
public interface AiState {
boolean act( boolean enemyInFOV, boolean justAlerted );
}