v3.3.5: fixed gnoll geomancer never swapping targets naturally
This commit is contained in:
@@ -550,13 +550,21 @@ public class GnollGeomancer extends Mob {
|
|||||||
@Override
|
@Override
|
||||||
public boolean act(boolean enemyInFOV, boolean justAlerted) {
|
public boolean act(boolean enemyInFOV, boolean justAlerted) {
|
||||||
if (!enemyInFOV){
|
if (!enemyInFOV){
|
||||||
spend(TICK);
|
//if we can't see our current target, try to find a new one
|
||||||
return true;
|
enemy = null;
|
||||||
|
enemy = chooseEnemy();
|
||||||
|
if (enemy != null){
|
||||||
|
return act(true, justAlerted);
|
||||||
|
} else {
|
||||||
|
//wait if we can't
|
||||||
|
spend(TICK);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
enemySeen = true;
|
enemySeen = true;
|
||||||
|
|
||||||
//use abilities more frequently on the hero's initial approach or if sapper is alive
|
//use abilities more frequently on the enemy's initial approach or if sapper is alive
|
||||||
// but only if hero isn't stunned, to prevent stunlocking
|
// but only if enemy isn't stunned, to prevent stunlocking
|
||||||
if ((Dungeon.level.distance(pos, enemy.pos) > 2 || hasSapper())
|
if ((Dungeon.level.distance(pos, enemy.pos) > 2 || hasSapper())
|
||||||
&& buff(RockArmor.class) != null
|
&& buff(RockArmor.class) != null
|
||||||
&& enemy.buff(Paralysis.class) == null){
|
&& enemy.buff(Paralysis.class) == null){
|
||||||
|
|||||||
Reference in New Issue
Block a user