Guest User

Untitled

a guest
Jun 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. def boss_floor():
  2.  
  3. boss_hp = 100
  4. your_hp = 100
  5.  
  6. while boss_hp > 0:
  7. print("Attack boss: 1.sword 2.arrow 3.magic")
  8.  
  9. attack = input('> ')
  10.  
  11. if attack == "sword" or "arrow" or "magic":
  12. boss_hp -= random.choice(attack_value)
  13. print("You attack the boss!")
  14. print(f"Boss hp: {boss_hp}n")
  15. print("Big boss kicks you in the nuts")
  16. your_hp -= random.choice(attack_value)
  17. print(f"hp: {your_hp}n")
  18.  
  19.  
  20. else:
  21. print("Input Invalid")
  22. print(f"Boss hp: {boss_hp}")
  23.  
  24. if boss_hp <= 0:
  25. print("You win!")
  26. exit(0)
  27.  
  28. if your_hp <= 0:
  29. print("You lose!")
  30. exit(0)
Add Comment
Please, Sign In to add comment