v2.0.0: fixed feint not redirecting aggro in some cases
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user