Exemple #1
0
 def __init__(self, defense, damage_reduction, name, desc):
     Item.__init__(self, name, desc)
     #code here
     self.defense = defense
     self.damage_reduction = damage_reduction
     self.required_strength = self.calc_required_strength()
     self.proc = list()
    def __init__(self, min_damage, max_damage, chance, name, description):
        Item.__init__(self, name, description) 
        self.min_damage = min_damage
        self.max_damage = max_damage
        self.abs_damage = min_damage + max_damage * 2

        if chance > 20:
            self.chance = 20
        else:
            self.chance = chance

        self.speed = self.calc_speed() 
        self.required_strength = self.calc_required_strength()
        self.required_agility = self.calc_required_agility()
        self.score = self.score()
        self.proc = list()
        return