Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Character:
- drop = 0, 0
- xp_value = 0
- 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
- warrior = Character("Warrior 🪓", 100, 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 = Goblin("Goblin 👺", 50, 3, 3, 2, 5, 1)
- def char_select():
- char_decision = 'n'
- while char_decision.lower() != 'y':
- classes = [0,warrior, tanker, thief, archer, mage, healer, assassin]
- char_choose = int(input('What class do you want to choose? \n1. Warrior \n2. Tanker \n'
- '3. Thief \n4. Archer \n5. Mage \n6. Healer \n7. Assassin \n'))
- if char_choose > 7:
- os.system("cls")
- print('You chose the wrong value!')
- if char_choose <= 7:
- os.system("cls")
- print('Selected class:')
- classes[char_choose].printstats()
- char_decision = input((f'Do you want to play as {classes[char_choose].name}\n'))
- os.system("cls")
- print("Okeeeeeej lets go")
- char_select()
- def damage_ratio(char_choose):
- core = 5 + (char_choose.strength * 2) + (char_choose.magic * 2) + (char_choose.agility * 1) - (goblin.defense * 2)
- crit_chance = ri(0,1)
- if crit_chance == 0:
- print("Health Goblin: " + str(goblin.health - core))
- if crit_chance == 1:
- core = core * 2
- print("Health Goblin: " + str(goblin.health - core))
- damage_ratio(char_choose)
Add Comment
Please, Sign In to add comment