def add_weapon(self): weapon_skills = {'wEdg': 0, 'wImp': 0, 'wFll': 0, 'wPol': 0, 'wThr': 0, 'wBow': 0, 'wMsD': 0} for k, v in weapon_skills.items(): weapon_skills[k] = self.skills[k] max_skill = max(weapon_skills.keys(), key=lambda k: weapon_skills[k]) if max_skill == 'wEdg': self.add_item(items.Shortsword(), 1) if max_skill == 'wImp': self.add_item(items.Club(), 1) if max_skill == 'wFll': self.add_item(items.MFlail(), 1) if max_skill == 'wPol': self.add_item(items.TKnife(), 1) if max_skill == 'wBow': self.add_item(items.SBow(), 1) if max_skill == 'wMsD': self.add_item(items.Crossbow(), 1)
def __init__(self): self.name = "Trader" self.gold = 100 self.inventory = [ items.Bread(), items.ShortBow(), items.PotionOfHealth(), items.ShortSword(), items.Crossbow() ]
def __init__(self): self.inventory = [items.Gold(15), items.Pillow(), items.Dagger(), items.Crossbow(),\ items.Revolver(), items.FinalKey(), items.Moltov()] self.hp = 100 self.maxHp = 100 self.location_x, self.location_y = world.starting_position self.victory = False self.experience = 0 self.level = 1 self.money = 30 self.attackPower = 100 self.nextLevelUp = 10 self.chosenWpn = None self.armor = False self.armorHits = 0 self.currentWpn = self.inventory[1]
def __init__(self, x, y): super().__init__(x, y, items.Crossbow(), beenThere = False,\ key = items.FinalKey(), gotBox = False, gotKey = False)
def __init__(self, x, y, item): self.item =[items.Moltov(), items.Crossbow()] super().__init__(x, y)