Skip to content

Instantly share code, notes, and snippets.

@samister2k
Created January 26, 2018 12:31
Show Gist options
  • Save samister2k/cf713d95b351077538283af06f8bddd6 to your computer and use it in GitHub Desktop.
Save samister2k/cf713d95b351077538283af06f8bddd6 to your computer and use it in GitHub Desktop.
class Monster:
health = 15
def getScratch(self):
self.health = self.health - 2
def sayHealth(self):
print("my health is" + str(self.health))
def getThunder(self):
self.health = self.health - 15
pika = Monster()
BBS = Monster()
pika.getScratch()
pika.sayHealth()
BBS.sayHealth()
choice = input ("choose your attack: thunder or pound")
if choice == "thunder":
print("critical hit, but you lose health due to recoil")
pika.getThunder()
BBS.getScratch()
else:
print("thats not a option")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment