I need a little help in order to understand smth

Hello guys!
The last “else” doesn’t seem to work and I don’t understand why. It says “unexpected token” - fix your code.
Doesn’t the bash attack have a cooldown, just like the cleave attack?


def attack:
    if enemy:
        if self.isReady("cleave"):
            self.cleave(enemy)
        else:
            if self.isReady("bash"):
                hero.bash(enemy)
        else:
            hero.attack(enemy)

There should be no more than one else for each if. For Python you can use elif statement and else will be the final one:

if a > 0:
    hero.say("It's positive")
elif a < 0:
    hero.say("It's negative")
else:
   hero.say("One option else - zero")

I get it now, seems reasonable. Thanks!