class Game_Troop
def smooth_target_enemy(enemy_index)
enemy = @enemies[enemy_index]
if enemy != nil and enemy.exist?
return enemy
end
a,n = enemy_index + 1, @enemies.size
while a % n != enemy_index
if (ene = @enemies[a % n]) != nil and ene.exist?
return ene
end
a += 1
end
end
end