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.67 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.  
  39. #while True:
  40. if character not in whole or artibute not in whole:
  41. print('Wypierdalaj')
  42. elif character_2 not in whole or artibute_2 not in whole:
  43. print('Wypierdalaj')
  44. else:
  45. time.sleep(2)
  46. pick_hero()
  47. pick_opponent()
  48. if power > power_2:
  49. print('You win')
  50. time.sleep(2)
  51. print(" ")
  52. input('Press enter to continue or ctrl + c to exit')
  53. print(" ")
  54.  
  55. elif power == power_2:
  56. print('Remis')
  57. time.sleep(2)
  58. print(" ")
  59. input('Press enter to continue or ctrl + c to exit')
  60. print(" ")
  61.  
  62. else:
  63. print('You lose')
  64. time.sleep(2)
  65. print(" ")
  66. input('Press enter to continue or ctrl + c to exit')
  67. print(" ")
  68.  
  69. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement