Пример #1
0
 def generate_poison_proc(self, quality=1):
     #generates a poison proc of variable quality
     dist = Distributed_Random()
     dura_max = 4
     dura_min = 1
     chance_min = 15
     chance_max = 30
     damage_min = 3
     damage_max = 10
     if quality == 2:
         dura_max = 6
         chance_max = 50
         damage_min = 5
         damage_max = 15
     if quality == 3:
         dura_min = 3
         dura_max = 8
         chance_min = 40
         chance_max = 75
         damage_min = 10
         damage_max = 20
     
     chance = dist.randint(chance_min, chance_max)
     dura = dist.randint(dura_min, dura_max)
     damage = dist.randint(damage_min, damage_max)
     return Poison_Proc(chance, dura, damage)
Пример #2
0
 def generate_spear(self, quality = 1):
     dist = Distributed_Random()
     abs_range = Config.weapon["spear"]["abs_range"][quality] 
     min_range = Config.weapon["spear"]["min_range"][quality] 
     chance_range = Config.weapon["spear"]["chance_range"][quality] 
     chance_min = Config.weapon["spear"]["chance_min"][quality] 
     abs_min = Config.weapon["spear"]["abs_min"][quality] 
     min_min = Config.weapon["spear"]["min_min"][quality] 
     
     min_dam = dist.randint(min_min, min_range)
     abs_dam = dist.randint(abs_min, abs_range)
     max_dam = min_dam + abs_dam
     chance = dist.randint(chance_min, chance_range)
     return Spear_Weapon(min_dam, max_dam, chance, self.generate_spear_name(quality), 'desc')
Пример #3
0
 def generate_sword(self, quality = 1):
     #generate sword with random stats and magical properties
     dist = Distributed_Random()
     abs_range = Config.weapon["sword"]["abs_range"][quality] 
     min_range = Config.weapon["sword"]["min_range"][quality]
     chance_range = Config.weapon["sword"]["chance_range"][quality] 
     chance_min = Config.weapon["sword"]["chance_min"][quality] 
     abs_min = Config.weapon["sword"]["abs_min"][quality] 
     min_min = Config.weapon["sword"]["min_min"][quality]
         
     min_dam = dist.randint(min_min, min_range)
     abs_dam = dist.randint(abs_min, abs_range)
     max_dam = min_dam + abs_dam
     chance = dist.randint(chance_min, chance_range)
     return Sword_Weapon(min_dam, max_dam, chance, self.generate_sword_name(quality), 'desc')
Пример #4
0
    def generate_wand(self, quality=1):
        dist = Distributed_Random()
        abs_range = Config.weapon["wand"]["abs_range"][quality]
        min_range = Config.weapon["wand"]["min_range"][quality]
        chance_range = Config.weapon["wand"]["chance_range"][quality]
        chance_min = Config.weapon["wand"]["chance_min"][quality]
        abs_min = Config.weapon["wand"]["abs_min"][quality]
        min_min = Config.weapon["wand"]["min_min"][quality]

        min_dam = dist.randint(min_min, min_range)
        abs_dam = dist.randint(abs_min, abs_range)
        max_dam = min_dam + abs_dam
        chance = dist.randint(chance_min, chance_range)
        name = self.get_wood_material(quality) + " Wand"
        return Wand_Weapon(min_dam, max_dam, chance, name, 'desc')
Пример #5
0
    def generate_hammer(self, quality = 1):
        dist = Distributed_Random()
        abs_range = Config.weapon["hammer"]["abs_range"][quality] 
        min_range = Config.weapon["hammer"]["min_range"][quality]
        chance_range = Config.weapon["hammer"]["chance_range"][quality] 
        chance_min = Config.weapon["hammer"]["chance_min"][quality] 
        abs_min = Config.weapon["hammer"]["abs_min"][quality] 
        min_min = Config.weapon["hammer"]["chance_range"][quality] 
        #Vary stats for high/low quality

        min_dam = dist.randint(min_min,min_range)
        abs_dam = dist.randint(abs_min,abs_range)
        max_dam = min_dam + abs_dam
        chance = dist.randint(chance_min,chance_range)
        name = self.generate_hammer_name(quality)
        return Hammer_Weapon(min_dam, max_dam, chance, name, 'desc')
Пример #6
0
    def generate_stun_proc(self, quality=1):
        #returns a stun proc of variable quality
        dist = Distributed_Random()
        dura_max = 2
        dura_min = 1 
        chance_min = 15
        chance_max = 30
        if quality == 2:
            dura_max = 4
            chance_max = 50
        if quality == 3:
            dura_max = 6
            dura_min = 3
            chance_min = 40
            chance_max = 75

        return Stun_Proc(dist.randint(chance_min, chance_max), dist.randint(dura_min, dura_max))
Пример #7
0
    def generate_thorn_proc(self, quality=1):
        #generates a thorn proc of variable quality
        dist = Distributed_Random()
        chance_min = 15
        chance_max = 30
        damage_min = 5
        damage_max = 10
        if quality == 2:
            chance_max = 50
            damage_min = 7
            damage_max = 20
        if quality == 3:
            chance_min = 40
            chance_max = 75
            damage_max = 30
            damage_min = 15

        chance = dist.randint(chance_min, chance_max)
        damage = dist.randint(damage_min, damage_max)
        return Thorn_Proc(chance, damage)
Пример #8
0
    def generate_leech_proc(self, quality=1):
        #generates a leech proc of variable quality
        dist = Distributed_Random()
        chance_min = 15
        chance_max = 30
        perc_min = 5
        perc_max = 15
        if quality == 2:
            chance_max = 50
            perc_min = 10
            perc_max = 20
        if quality == 3:
            chance_min = 40
            chance_max = 75
            perc_min = 20
            perc_max = 30

        chance = dist.randint(chance_min, chance_max)
        percent = dist.randint(perc_min, perc_max)
        return Leech_Proc(chance, percent)
Пример #9
0
 def generate_low_quality(self):
     #generate low quality piece of armor
     dist = Distributed_Random()
     defense = dist.randint(10,17)
     dr = dist.randint(0,3)
     return Armor(defense, dr, self.generate_light_name(), 'desc')
Пример #10
0
 def generate_high_quality(self):
     #generate a random high quality piece of armor
     dist = Distributed_Random()
     defense = dist.randint(12,17)
     dr = dist.randint(12,19)
     return Armor(defense, dr, self.generate_heavy_name(), 'desc')
Пример #11
0
 def generate_heavy_armor(self):
     dist = Distributed_Random()
     defense = dist.randint(10,17)
     dr = dist.randint(12,19)
     return Armor(defense, dr, self.generate_heavy_name(), 'desc')
Пример #12
0
 def generate_medium_armor(self):
     dist = Distributed_Random()
     defense = dist.randint(10,19)
     dr = dist.randint(8,13)
     return Armor(defense, dr, self.generate_medium_name(), 'desc')
Пример #13
0
    def generate_light_armor(self):
        dist = Distributed_Random()
        defense = dist.randint(10,21)
        dr = dist.randint(0,5)

        return Armor(defense, dr, self.generate_light_name(), 'desc')