Skip to content

Instantly share code, notes, and snippets.

@ethanshine1234
Last active October 5, 2016 07:53
Show Gist options
  • Save ethanshine1234/146bd942f44739952754e6e853f5c172 to your computer and use it in GitHub Desktop.
Save ethanshine1234/146bd942f44739952754e6e853f5c172 to your computer and use it in GitHub Desktop.
STJLOL-ES-pokemon
"""
it works I just don't know how to stop the program from resetting the health back to 10
"""
from time import sleep
import random
def menu():
print("fight")
sleep(0.5)
print("run")
sleep(0.5)
print("pokemon")
choice=input("")
if choice == "fight":
fight()
elif choice == "run":
print("you can't escape!!")
menu()
elif choice == "pokemon":
print("you have no other pokemon")
def fight():
print("tailwhip")
sleep(0.5)
print("thunderstrike")
answer=input("")
print("pikachu uses " + answer )
health=10
damage=random.random()
damage=10*damage
print(int(damage))
sleep(1)
health = health - damage
if damage > 5:
sleep(0.5)
print("it's super effective!!")
elif damage < 4:
sleep(0.5)
print("it's not very effective")
elif damage < 1:
print("it doesn't do any damage")
else:
print("how is this possible???")
print("rattata is now on:")
print(int(health))
print("welcome to my prototype pokemon game")
print("I hope you enjoy")
print("type your answer")
sleep (2)
print("your walking through some grass")
sleep(1)
print("A WILD RATTATA APPEARED. it has 10hp")
sleep(1)
menu()
while True:
move=input("type go to continue")
if move == "enter":
menu()
elif move == "go":
menu()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment