Storming the Farmhouse HELP!

I’m proabably am going the wrong direction for my coding. But here’s what I have so far:

Soldiers will slowly arrive, but the ogres will overwhelm them.

A basic attack loop isn’t going to be enough to keep you alive.

while True:
flag = self.findFlag()
enemy = self.findNearestEnemy()

if flag:
    self.say("Maybe I should do something with that flag?")
    self.pickUpFlag(flag)
    distance = self.distanceTo(enemy)
    if distance < 5:
        if self.isReady("cleave"):
            self.cleave(enemy)
        else:
            self.attack(enemy)
            self.attack(enemy)
else:
    self.say("I'm bored.")
    if distance < 5:
        if self.isReady("cleave"):
            self.cleave(enemy)
        else:
            self.attack(enemy)

Can someone help me with this level??? I’ve been stuck on it for hours!

I’ve tried it for like 30 minutes. You don’t move fast enough and you have to little health to really do much. Even if you just shield there and cleave when you can you still die before the rangers come and even before the peasants are killed.

I think this level might be broken

The biggest issue I see with your code is the self.say("Words") which makes the hero pause for 2 seconds before doing anything.

Does it improve if you remove that?