Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### shitty battle simulator ###
- import random
- import time
- playerHealth = 50
- compHealth = 50
- def battleIntro():
- print ("You enter the arena to the cheers of the crowds. ")
- print ("Across fomr you stands your opponent. ")
- print ("Only one you will leave this place alive. ")
- print ("Prepare to fight!" )
- def battlePlayer():
- missChance = 2
- while playerHealth > 0 and compHealth > 0:
- print ("Do you wish to attack")
- time.sleep(input())
- miss = random.randint (1, 4)
- if (missChance) == (miss):
- print ("You swing wildly and miss your opponent. ")
- else:
- print ("You strike your opponent doing damage. ")
- global compHealth = global compHealth - 5
- ###syntax error on the = ###
- def battleComp():
- missChance = 2
- while playerHealth > 0 and compHealth > 0:
- print ("Your opponent charges at you. ")
- time.sleep(2)
- miss = random.randint (1, 4)
- if (missChance) == (miss)
- print ("You dodge his attack. ")
- else:
- print ("He manages to strike you doing damage. ")
- global playerHealth = global playerHealth - 5
- def battleResult():
- if global comphealth == 0:
- print ("Your hands are slick with his blood. ")
- print ("You have slayen your opponent." )
- or if global playerHealth == 0:
- print ("Your opponent stands over you and drives his sword into your chest. ")
- print ("You have died! ")
- playAgain = "yes"
- while playAgain == "yes" or playAgain == "y":
- battleIntro()
- ### unsure of what needs to go here ###
- print ("Do you want to play again?")
- playAgain = input()
Add Comment
Please, Sign In to add comment