You can make something like:
...
while hp > 0 and eh > 0:
act = "empty"
print("Action? (attack, heal, nothing):")
# With this while, you are accepting anything like "aTTaCk", "AttaCK", etc
while act.lower() not in ["attack","heal", "", "nothing"]:
act = input(">")
attack = random.randint(1, 30)
heal = random.randint(1, 15)
enemy_attack = random.randint(1, 30)
enemy_heal = random.randint(1, 15)
enemy_heal_within_5 = random.randint(1, 5)
enemy_decision = random.randint(1, 2)
...
I added the option nothing
and also an empty string(""
) as an option if the player doesn't want to make anything. If you don't need any of them, just delete both from the list in while
statement.