Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Reddit-Link: https://www.reddit.com/r/beginnerprojects/comments/1aw0iq/project_turn_based_pokemon_style_game/
- # All of this is not even close to be finished.
- from random import randint
- print""
- print" .,;#@ Turn Based Game @#;,."
- print""
- print"How it works:" # Game Introduction follows
- print"There are 3 Moves you got: Punch, Kick and Heal"
- print"Punch deals moderate damage (18 - 25)"
- print"Kick can deal high or low damage (10 - 35)"
- print"Heal heals you for 18 - 25"
- print""
- print"Both, the computer and you, have 100 HP, if you reach 0 you loose"
- print"This game is turn based"
- print""
- print"-----------------------------------------------------------------"
- print""
- hpc = 100 # HP computer
- hpu = 100 # HP user
- turn = 1 # responible for the turn, the user always starts
- # declaring functions of the 'moves' you can do
- def punch(x):
- indiefresse = randint(18,25)
- x -=indiefresse
- print"Punch dealt ",indiefresse," damage."
- def kick(y):
- aufsmaul = randint(10,35)
- y -= aufsmaul
- print"Kick dealt ",aufsmaul," damage."
- def heal(z):
- glueckauf = randint(18,25)
- z += glueckauf
- print"Heal healed for ",glueckauf," HP."
- while hpu != 0 or hpc != 0: # here starts the fighting
- while turn == 1: # users turn
- print"Du hast ",hpu," Lebenspunkte!"
- action = input("Welche Aktion moechtest du ausfuehren? Punch = 1, Kick = 2 und Heal = 3. Geb die Nummer ein: ")
- if action == 1:
- punch(hpc)
- print"Your Enemy has ",hpc," HP left."
- print ""
- elif action == 2:
- kick(hpc)
- print"Your Enemy has ",hpc," HP left."
- print ""
- elif action == 3:
- heal(hpu)
- print"You have ",hpu," HP left."
- print ""
- else:
- print"Please stay with the Number 1 for Punch, 2 for Kick and 3 for Heal ..."
- turn += 1
- while turn == 2:
- narf = randint(1,11)
- if hpc <= 35:
- if narf < 4:
- print "The enemys ",punch(hpu)
- print ""
- elif narf < 7:
- print "The enemys ",kick(hpu)
- print ""
- else:
- heal(hpc)
- print"The Computers HP increased to",hpu," HP."
- print ""
- else:
- if narf < 5:
- print "The enemys ",punch(hpu)
- print ""
- elif narf < 9:
- print "The enemys ",kick(hpu)
- print ""
- else:
- heal(hpc)
- print"The Computers HP increased to",hpu," HP."
- print ""
- turn -= 1
- else: # here we declare what happens, when the hp of someone drops to zero
- if hpu == 0:
- print"You lost!"
- elif hpc == 0:
- print"You won!"
- else:
- print"Something went wrong, this is for debugging"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement