Advertisement
Guest User

Untitled

a guest
Aug 26th, 2021
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.94 KB | None | 0 0
  1. from random import randrange
  2.  
  3. player = ()
  4. player_exp = 0
  5. player_hp = 20
  6. player_strength = randrange(3, 9)
  7. player_level = 1
  8.  
  9. imp_hp = 20
  10. imp_strength = randrange(3, 5)
  11.  
  12. if player_exp == 10:
  13.     player_level = 2
  14.     player_hp = 31
  15.     player_strength = randrange(4, 10)
  16.  
  17. if player_exp == 20:
  18.     player_level = 3
  19.     player_hp = 39
  20.     player_strength = randrange(5, 11)
  21.  
  22. print("You enter a cave to eliminate the demons. You have been ordered by a nearby towns Mayor to complete this task.")
  23. print("As you enter a cave, the first room contains a small, flying creature. You ready your iron blade.")
  24. input("\nEnter any key to commence battle: ")
  25. print("\nThe small creature see you and rushes to attack!")
  26.  
  27. while imp_hp >= 1:
  28.     input("Enter a key to roll an attack: ")
  29.     Battle = imp_hp - player_strength
  30.     print("You inflict")
  31.     print(player_strength)
  32.     print("Enemy's remaining HP:")
  33.     print(Battle)
  34.     imp_hp = Battle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement