Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. import random
  2. import time
  3. import os
  4.  
  5. while True:
  6. def main():
  7.  
  8. whole = ['warrior','wizard','archer','fire','water','nature']
  9. power = random.randint(1,10)
  10. power_2 = random.randint(1,10)
  11. print('Welcome in my game! Pick one of this 3 characters: warrior, archer, wizard')
  12. print('And one of this 3 elements: fire, water, nature')
  13. print(" ")
  14. time.sleep(2)
  15. character = input('Select your character: ')
  16. artibute = input('Enter your artibute: ')
  17. print(" ")
  18. character_2 = input('Choose your opponent: ')
  19. artibute_2 = input('Pick opponent\'s artibute: ')
  20. os.system('clear')
  21.  
  22. def pick_hero():
  23.  
  24. print('Nice you picked: ',character)
  25. print('You have: ',artibute,'artibute')
  26. print('And your power is: ',power)
  27. print(" ")
  28.  
  29. def pick_opponent():
  30.  
  31. print("\/\/\/\/\/\/\/ VS \/\/\/\/\/\/\/\/")
  32. print(" ")
  33. print('Your opponent: ',character_2)
  34. print('Enemy artibute: ',artibute_2)
  35. print('Opponent\'s power: ',power_2)
  36. print(" ")
  37.  
  38. def what_next():
  39. time.sleep(2)
  40. print(" ")
  41. input('Press enter to continue or ctrl + c to exit')
  42. print(" ")
  43.  
  44. #while True:
  45. if character not in whole or artibute not in whole:
  46. print('Wypierdalaj')
  47. elif character_2 not in whole or artibute_2 not in whole:
  48. print('Wypierdalaj')
  49. else:
  50. time.sleep(2)
  51. pick_hero()
  52. pick_opponent()
  53. if power > power_2:
  54. print('You win')
  55. what_next()
  56.  
  57. elif power == power_2:
  58. print('Remis')
  59. what_next()
  60.  
  61. else:
  62. print('You lose')
  63. what_next()
  64.  
  65. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement