Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- onward = "\n..."
- boss_hp = 20
- player_hp = 10
- num_lines = 100
- Turn = True
- while Turn:
- action_play = input("Choose an action(attack or run): ")
- if action_play == "attack":
- player_atk = random.randint(3, 5)
- damage = player_atk
- boss_hp = boss_hp - damage
- print("\nYou did %d damage!\nBoss HP is now %d!" % (damage, boss_hp))
- if damage == 5:
- print(' CRITICAL!')
- if boss_hp <= 0:
- print("The Boss is Dead!\nYou Win!!")
- break
- print("\nBoss Attacks!")
- boss_atk = random.randint(1, 3)
- boss_damage = boss_atk
- player_hp = player_hp - boss_damage
- print("Ouch! You took %d damage! You now have %d HP!" % (boss_damage, player_hp))
- if player_hp <= 0:
- print("YOU DIED!")
- break
- if action_play == "run":
- print("You ran away...")
- break
- input(onward)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement