Mad Maxer (Clojure): Ran out of time?


#1

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?


Max Maxer: Decoys?
#2

The thing is, there shouldn’t be any decoys at all. All those decoys should be ogre soldiers. Apparently, someone changed up the level. For now, kill the decoys.

@nick, is there a reason for there to be decoys instead of munchkins?


#3

The decoys were added to adjust the level’s balance. Yes, you are supposed to kill the decoys, but only if they’re the farthest enemy from you.