Holding the Forest Pass

Hi this is Luke Patterson do any of you know how to complete Holding the Forest Pass? It seems impossible to complete!! If any of you have suggestions please let me know.

Please post your cod, what happens when you run your code, and why it seems impossible.

Hold the Forest Pass is a level based mainly on flags. You use the flags to move from place to place, and attack the enemies that come.

I used the flags to direct the humans to the ogres but the humans did nothing.
here`s the code:
loop:
enemy = self.findNearestEnemy()
flag = self.findFlag()
if flag:
self.pickUpFlag(flag)

elif enemy and self.distanceTo(enemy) < 15:
    if self.isReady("cleave"):
        self.cleave(enemy)
    else:
        self.attack(enemy)

Please post your code

with radiant, harmonious formatting

as described in the FAQ.
As currently your indentations are missing I can not see exactly where this is going wrong.

loop:
enemy = self.findNearestEnemy()
flag = self.findFlag()
if flag:
self.pickUpFlag(flag)

elif enemy and self.distanceTo(enemy) < 15:
    if self.isReady("cleave"):
        self.cleave(enemy)
    else:
        self.attack(enemy)

Do you have enough health? The fight is pretty difficult, so you might need to be really good at placing flags or have some decent armor to win.

Sorry for the late response, I have 386

It should be possible, but difficult, to beat it with that much. Try luring the ogres around the side to the archers and getting a really good cleave in to take down the throwers in the back.

Sorry for the delay, that’s what I did, I tried again a few days ago and that time my human was a magician. Does that have anything to do with it?

I just ran my code again and I placed the flag on the cross-bone X. My human went to the x then started towards the ogres and stopped

Did you lure the ogres into their death?

No, it didn`t work. My hero just stopped

I just ran the code again and a little progress. My hero followed the flags and defeated the ogres, but died. My health is 889.
Here`s my code:

loop:
    enemy = self.findNearestEnemy()
    flag = self.findFlag()
    if flag:
        self.pickUpFlag(flag)
      elif enemy and self.distanceTo(enemy) < 15:
        if self.isReady("cleave"):
            self.cleave(enemy)
        else:
            self.attack(enemy)

Code looks good, now it’s just a matter of darting in and out on the left side of the map to take out the throwers and then lead any swarm of other ogres back to your archer squad without dying.

Ok, thanks, I`ll try that :wink:

Finally beat the level!!! , What I learned was that the bigger ogres do the most damage. And I was surprised that there was an Ogre-wizard in the game, so I went to the cross-bone X, then I tried my best to lead them to an ambush and it worked. Thanks for the advice :grinning: :grinning: :laughing:

1 Like

You mean shaman not wizard. Later on there there will be witches and warlocks.

Ok thanks :blush: :blush: