diff --git a/src/battle/ai.c b/src/battle/ai.c index 1da16aa..1aeb2b1 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -597,7 +597,7 @@ static int nearEnemies(void) for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i]) { - if ((e->flags & EF_TAKES_DAMAGE) && e->side != self->side && !(e->flags & EF_DISABLED)) + if ((e->flags & EF_TAKES_DAMAGE) && e->side != SIDE_NONE && e->side != self->side && !(e->flags & EF_DISABLED)) { if ((self->aiFlags & AIF_TARGET_FOCUS) && (e->flags & EF_AI_TARGET)) {