Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint as ri
- # CHARACTER #
- class Character:
- def __init__(self,name,health,strenght,defense,stamina,agility,magic):
- self.name = name
- self.health = health
- self.strength = strenght
- self.defense = defense
- self.stamina = stamina
- self.agility = agility
- self.magic = magic
- def printstats(self):
- print(self.name)
- print("Health: ", self.health)
- print("Strength: ", self.strength)
- print("Defense: ", self.defense)
- print("Stamina: ", self.stamina)
- print("Agility: ", self.agility)
- print("Magic: ", self.magic)
- print()
- # MONSTER #
- class Monster:
- def __init__(self, name, health, strenght, defense, stamina, agility, magic,xp_value,gold):
- self.name = name
- self.health = health
- self.strength = strenght
- self.defense = defense
- self.stamina = stamina
- self.agility = agility
- self.magic = magic
- self.xp_value = xp_value
- self.gold = gold[0,0]
- @staticmethod
- def looting(gold):
- return ri(gold[0], gold[1])
- def printstats(self):
- print(self.name)
- print("Health: ", self.health)
- print("Strength: ", self.strength)
- print("Defense: ", self.defense)
- print("Stamina: ", self.stamina)
- print("Agility: ", self.agility)
- print("Magic: ", self.magic)
- print()
- def printbounty(self):
- print("Gold: ", self.looting(self.gold))
- print("Exp earned: ", self.xp_value)
- warrior = Character("Warrior πͺ", 1, 7, 5, 4, 2, 1)
- tanker = Character("Tanker π‘οΈ", 100, 2, 8, 4, 1, 1)
- thief = Character("Thief π‘οΈ", 100, 3, 2, 5, 7, 1)
- archer = Character("Archer πΉ", 100, 2, 2, 4, 8, 1)
- mage = Character("Mage β¨", 100, 1, 3, 3, 1, 7)
- healer = Character("Healer β€οΈ", 100, 1, 4, 5, 2, 6)
- assassin = Character("Assassin πͺ", 100, 8, 3, 4, 8, 1)
- goblin = Monster("Goblin πΊ", 50, 3, 3, 2, 5, 1,25,(0,10))
- blackgoblin = Monster("Black Goblin πΊ", 75, 2, 8, 4, 1, 1,40,(5,20))
- magegoblin = Monster("Mage Goblin πΊβ¨", 80, 1, 7, 2, 2, 6,60,(10,30))
- summonergoblin = Monster("Summoner Goblin πΊπΎ", 75, 1, 9, 2, 2, 8,150,(10,30))
- wolfyoung = Monster("Small Wolf πΊ", 50, 3, 3, 2, 5, 1,30,(1,10))
- wolfold = Monster("Wolf πΊ", 75, 4, 5, 3, 6, 1,60,(20,30))
- molerat = Monster("Mole Rat π", 30, 2, 3, 2, 4, 1,25,(0,10))
- flasheater = Monster("Flash Eater π₯©", 65, 7, 4, 2, 3, 1,50,(5,20))
- kelpie = Monster("Kelpie π", 60, 5, 3, 4, 2, 1,75,(5,20))
- skylight = Monster("Skylight π―οΈ", 10, 1, 1, 1, 1, 1,5,(0,5))
- boxbox = Monster("π BoxBox The Cruncher π", 100, 1, 5, 1, 1, 1,10,(50,100))
- treebeard = Monster("π The Treebeard π", 200, 8, 8, 5, 1, 1,300,(100,200))
- bruxet = Monster("π The Bruxet π", 300, 5, 8, 8, 6, 1,500,(125,250))
- necromancier = Monster("π The Necromancier π", 400, 1, 8, 7, 1, 9,750,(250,500))
- warrior.printstats()
- goblin.printbounty()
Advertisement
Add Comment
Please, Sign In to add comment