Help with Reaping Fire (JavaScript)

When the nearest enemy is a fangrider they would do nothing, true. But it also stops when there is no fangrider on the screen, which is what is confusing me. I would assume any other enemy type would just be attacked, or should, but it’s not, apparently. And so it either waits for the other griffin to be killed, or moves forward incrementally whenever the other griffin kills an enemy and switches targets. I can’t figure out why it’s waiting with every step and not just also attacking the enemies.

Sending them to a location to defend does work somewhat, but then they attack passing fangriders as well instead of ignoring them and focusing on other enemies. I actually managed to pass it earlier by some fluke, lucky placement of enemies that allowed the minefield to survive just long enough, but I just can’t reliably make it work, even with this alteration.

And I have no idea what to do when the minefield is gone, by that time there are so many enemies that everything gets overwhelmed no matter what I do. I’m not even sure if and how I can track when the minefield is gone. How do I even find mines?