I'm just doing a turn based text combat system, and I'm trying to add cool downs to certain abilities, which I've done, but even if an ability is on cool down and the the user presses the button for the spell the turn still gets consumed just the spell doesn't work.
I can add except value error to something that's not an available option, but I'm struggling to add it to something that can sometimes be an option.
ab1 = 1 #This is tracker for cool down (if its 0 the spell can be used)
if(ab1 == 0):
print("1)",ability1)
else:
print("1)",ability1, "- This ability is not ready")
useSpell = input("")
if(useSpell == "1") and (ab1 == 0):
#Do Spell Stuff
else:
#This is where I believe I need to block the code from continuing
Aucun commentaire:
Enregistrer un commentaire