here is my code
# Munchkins are attacking!
# The swarms will come at regular intervals.
# Whenever you can, cleave to clear the mass of enemies.
while True:
enemy = hero.findNearestEnemy()
# Use an if-statement with isReady to check "cleave":
if enemy:
ready = hero.isReady("cleave")
# Cleave!
hero.cleave(enemy)
# Else, if cleave is not ready:
hero.attack(enemy)
hero.attack(enemy)
# Attack the nearest ogre!
enemy = hero.findNearestEnemy()
hero.attack(enemy)
hero.attack(enemy)