this level is tough, but i can help.
if a ogre is near you, you have to attack.
so if you put
if self.distanceTo(enemy1) < 5:
hero.attack(enemy)
like a if loop, it should work. but, does it only work once? thats where a loop comes in.
loop:
if self.distanceTo(enemy1) < 5:
hero.attack(enemy)
but we dont know what the enemy is! so we have to find it
loop:
distance = enemy
enemy = hero.findNearestEnemy()
if self.distanceTo(enemy1) < 5:
hero.attack(enemy).
but what do we do if there is no enemy?(optional)
else:
shield
i hope this helps!
ps: you can use cleave, but its up to you!