Arcane Ally Level - Wrong Code?

what I said before is exactly the problem and that’s what the null means - there is no enemy. You just need to put

if enemy:

after the variable enemy that you have defined and tab everything after it over.

Summary
if enemy:
    if hero.isReady("cleave"):
        hero.cleave(enemy)
    else:
        hero.attack(enemy)

Memorize this because you’re going to be doing it a LOT.

3 Likes