def evade():
x, y = getPos(hero)
orbs = hero.findEnemyMissiles()
if len(orbs):
orb = hero.findNearest(orbs)
if hero.distanceTo(orb) < 3:
if y > 14:
hero.moveXY(x, y - 7)
else:
hero.moveXY(x, y + 7)
error Line 45: TypeError: Can’t read protected property: findEnemyMissiles
@Alex_M, do you have the Twilight Glasses equipped? Either way, please post all of your code. Since this level is a ‘challenge’ level (no code or guidance), it will help to see what else you’ve come up with.
I copied your code and ran it. The hero never moved, so was taken out very quickly by the ‘orbs’. The tactic I used in my code was to wait for the robots to fire, determine the individual coordinates of the closest missile and then just hop up and down…in other words, detect incoming missiles, determine their trajectory and move opposite that (only changing the hero pos.y):
With that being said, in your evade function, rather than detecting distance, try determining the pos.y of the missile and then move up, or down as needed. I just moved between “x”: hero.pos.x, “y”: 10 (or 20)
Meanwhile, up top…keep all of your friends still, except for the paladin. Use him to lure the chieftan to the yak…once the yak attacks, send the paladin directly against the witch. Once both of those are dead, send him to the exit.
Then, command the remaining friends to head for the exit too.
At the same time, summon your soldiers, have them attack the nearest robot and have your hero high tail it out of there:
You must kill both of the ogres for that to happen. I just realized I could have worded my last better. Please understand that I am intending to share my method/tactics…there are soo many ways to complete this level, these ideas are what worked for me.
How about:
Meanwhile, up top…keep all of your friends still, except for the paladin. Use him to lure the chieftain to the yak…once the yak attacks, send the paladin directly against the witch. Once both of those are dead, send the paladin to the exit. Then, command the remaining friends to head for the exit too.
Once both ogres are dead, summon your soldiers, have them attack the nearest robot and have your hero high tail it out of there.
I noticed that the initial comments are missing, which is where it tells you to kill both ogres to open the door…
# What eldritch artifacts are these? Don"t let them blast you!
# The ice gate will open when both ogres are defeated
Therefore, I kept my hero dancing up and down until the door opened, then summoned and ran for it.