Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print ("Game -- James")
- playername = input("What is your name? ")
- class mage:
- damage = 5
- health = 10
- dodge = 4
- def __init__(self, damage, health, dodge):
- self.damage = damage
- self.health = health
- self.dodge = dodge
- class knight:
- damage = 3
- health = 15
- dodge = 2
- def __init__(self, damage, health, dodge):
- self.damage = damage
- self.health = health
- self.dodge = dodge
- class archer:
- damage = 4
- health = 7
- dodge = 10
- def __init__(self, damage, health, dodge):
- self.damage = damage
- self.health = health
- self.dodge = dodge
- class goblin:
- damage = 2
- health = 10
- def __init__(self, damage, health):
- self.damage = damage
- self.health = health
- self.dodge = dodge
- class attackmage:
- damage = 5
- def __init__(self, damage):
- self.damage = damage
- class attackknight:
- damage = 3
- def __init__(self,damage):
- self.damage = damage
- class attackarcher:
- damage = archer.damage
- def __init__(self, damage):
- self.damage = damage
- def attack():
- if pickclass == "MAGE":
- attackchoice = input("Attack Goblin: 'Water Blast' ").upper()
- if attackchoice == "WATER BLAST" or "WATERBLAST" or "WTR BLST":
- print("|Goblin HP: ",goblin.health - attackmage.damage, "|")
- if pickclass == "KNIGHT":
- attackchoice = input("Attack Goblin: 'Swing' ").upper()
- if attackchoice == "SWING" or "SWNG" or "SIWNG":
- print("|Goblin HP: ",goblin.health - attackknight.damage, "|")
- if pickclass == "ARCHER":
- attackchoice = input("Attack Goblin: 'Arrow Shot' ").upper()
- if attackchoice == "ARROW SHOT" or "ARRW SHOT" or "ARW SHT":
- print("|Goblin HP: ",goblin.health - attackarcher.damage,"|")
- pickclass = input("Pick a class: (Mage, Knight, Archer): ").upper()
- print("Awh very nice class choice, " + pickclass + " is very strong class.")
- print("I am Daniel your quest master, I actually have a quest for you now.")
- print("QUEST -- Goblin Attack")
- print("Goblin | LVL: 1 | HP: 10 ")
- attack()
- if goblin.health > 0:
- attack()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement