Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Whats wrong with my code?

enemy = hero.findNearestEnemy()
if enemy:
    hero.attack(enemy)
else:
    hero.bash(enemy)
if hero.isReady("cleave"):
    hero.cleave(enemy)
else:
    hero.electrocute(enemy)

before you bash use hero.isReady

use hero.isReady on hero.electrocute as well

wait a minute, how can you bash when there’s no enemy