This is my code:
(dotimes [n 1000]
(.moveXY this (.x (.pos this)) (.y (.pos this)))
(def enemies (.findEnemies this))
(def enemyIndex 0)
(def maxDistance 0)
(while (< enemyIndex (count enemies))
(def enemy (get enemies enemyIndex))
(def distance (.distanceTo this enemy))
(when (> distance maxDistance)
(def farthest enemy)
(def maxDistance distance)
)
(def enemyIndex (inc enemyIndex))
)
(while (> (.health farthest) 0)
(def flag (.findFlag this))
(if flag
(.pickUpFlag this flag)
)
(.bash this farthest)
(.attack this farthest)
)
)
I am using Thorin and I have 1032 max health. I’m able to defeat all non-decoy enemies within 35 seconds, but after that the goal is still not updated and my character has no choice but to wait until the end of the level at which point I get “RAN OUT OF TIME”.
Is this a bug or am I missing something? Do I also have to defeat all of the decoys?