Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import time
- import os
- while True:
- def main():
- whole = ['warrior','wizard','archer','fire','water','nature']
- power = random.randint(1,10)
- power_2 = random.randint(1,10)
- print('Welcome in my game! Pick one of this 3 characters: warrior, archer, wizard')
- print('And one of this 3 elements: fire, water, nature')
- print(" ")
- time.sleep(2)
- character = input('Select your character: ')
- artibute = input('Enter your artibute: ')
- print(" ")
- character_2 = input('Choose your opponent: ')
- artibute_2 = input('Pick opponent\'s artibute: ')
- os.system('clear')
- def pick_hero():
- print('Nice you picked: ',character)
- print('You have: ',artibute,'artibute')
- print('And your power is: ',power)
- print(" ")
- def pick_opponent():
- print("\/\/\/\/\/\/\/ VS \/\/\/\/\/\/\/\/")
- print(" ")
- print('Your opponent: ',character_2)
- print('Enemy artibute: ',artibute_2)
- print('Opponent\'s power: ',power_2)
- print(" ")
- def what_next():
- time.sleep(2)
- print(" ")
- input('Press enter to continue or ctrl + c to exit')
- print(" ")
- #while True:
- if character not in whole or artibute not in whole:
- print('Wypierdalaj')
- elif character_2 not in whole or artibute_2 not in whole:
- print('Wypierdalaj')
- else:
- time.sleep(2)
- pick_hero()
- pick_opponent()
- if power > power_2:
- print('You win')
- what_next()
- elif power == power_2:
- print('Remis')
- what_next()
- else:
- print('You lose')
- what_next()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement