My hero Hattori seems to have enough speed,but this level always ends with “Ran out of time”
Sometimes he seems to cleave when there are too few enemies around, so he spends too much time fighting individual enemies.How do I not run out of time but still kill all the enemies
while True:
enemy = hero.findNearestEnemy()
# Use an if-statement with isReady to check "cleave":
if hero.isReady("cleave") and hero.distanceTo(enemy) <10:
# Cleave!
hero.cleave(enemy)
# Else, if cleave is not ready:
else:
# Attack the nearest ogre.
hero.attack(enemy)