v2.0.0: fixed feint not redirecting aggro in some cases
This commit is contained in:
+2
-2
@@ -53,7 +53,7 @@ import com.watabou.utils.Callback;
|
|||||||
public class Feint extends ArmorAbility {
|
public class Feint extends ArmorAbility {
|
||||||
|
|
||||||
{
|
{
|
||||||
baseChargeUse = 50;
|
baseChargeUse = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -126,7 +126,7 @@ public class Feint extends ArmorAbility {
|
|||||||
});
|
});
|
||||||
|
|
||||||
for (Mob m : Dungeon.level.mobs.toArray( new Mob[0] )){
|
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.alignment == Char.Alignment.ENEMY && m.state != m.PASSIVE && Dungeon.level.distance(m.pos, image.pos) <= 2)){
|
||||||
m.aggro(image);
|
m.aggro(image);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -928,11 +928,6 @@ public abstract class Mob extends Char {
|
|||||||
GLog.n( "%s: \"%s\" ", Messages.titleCase(name()), str );
|
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 {
|
public interface AiState {
|
||||||
boolean act( boolean enemyInFOV, boolean justAlerted );
|
boolean act( boolean enemyInFOV, boolean justAlerted );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user