Пример #1
0
 def __init__(self,
              name=None,
              controller=None,
              fight=None,
              unit_dict=None,
              complexity=None):
     StandardCreature.__init__(self,
                               name,
                               controller=controller,
                               fight=fight,
                               unit_dict=unit_dict)
     # Максимальные параметры
     self.max_hp = 3
     self.toughness = 3
     self.hp = 3
     self.abilities = [
         abilities.WeaponSnatcher(self),
         abilities.Dodge(self)
     ]
     self.weapon = engine.get_random_with_chances(
         ((weapons.Bow, 2), (weapons.Harpoon, 1)))(self)
     if unit_dict is not None:
         self.equip_from_dict(unit_dict)
     self.energy = int(self.max_energy / 2 + 1)
     self.loot_chances['weapon'] = 5
     self.stole = False
Пример #2
0
 def __init__(self,
              name=None,
              controller=None,
              fight=None,
              unit_dict=None,
              summoned=None,
              complexity=None):
     StandardCreature.__init__(self,
                               name,
                               controller=controller,
                               fight=fight,
                               unit_dict=unit_dict)
     # Максимальные параметры
     summoned = 0 if summoned is None else summoned
     self.max_hp -= summoned * 2
     if self.max_hp < 1:
         self.max_hp = 1
     self.hp = self.max_hp
     self.add_energy(-summoned)
     self.default_weapon = 'teeth'
     if unit_dict is not None:
         self.equip_from_dict(unit_dict)
     self.energy = self.max_energy
     self.split_check_action = self.create_action('split_check',
                                                  self.split_check,
                                                  'button_3',
                                                  order=59)
     self.crawl_action = self.create_action('worm-crawl-forward',
                                            self.crawl,
                                            'button_1',
                                            order=10)
Пример #3
0
    def __init__(self, name=None, controller=None, fight=None, unit_dict=None, complexity=None):
        StandardCreature.__init__(self, name, controller=controller, fight=fight, unit_dict=unit_dict)
        self.feared = False
        # Максимальные параметры
        self.max_hp = 3
        self.hp = self.max_hp
        self.max_energy = 5
        self.toughness = 4
        self.weapon = weapons.Fangs(self)
        self.default_weapon = 'fangs'
        self.abilities = [abilities.Cannibal(self), abilities.CorpseEater(self)]
        self.energy = int(self.max_energy / 2 + 1)
        self.crawl_action = self.create_action('worm-crawl-forward', self.crawl, 'button_1', order=10)
        self.crawl_back_action = self.create_action('worm-crawl-back', self.crawl_back, 'button_2', order=1)

        if unit_dict is not None:
            self.equip_from_dict(unit_dict)
Пример #4
0
    def __init__(self, name=None, controller=None, fight=None, unit_dict=None, complexity=None):
        StandardCreature.__init__(self, name, controller=controller, fight=fight, unit_dict=unit_dict)
        self.max_hp = 4
        self.toughness = 3
        self.hp = 4
        self.max_energy = 4
        self.energy = 4
        self.weapon = weapons.Sting(self)
        self.blood_filled = False
        self.new_ability(ability_name='fly', ability_func=self.fly,
                         ability_type='instant',
                         name_tuple=self.to_string('button_1'))

        self.new_ability(ability_name='get_blood',
                         ability_func=self.get_blood,
                         ability_type='passive',
                         ability_order=21)
Пример #5
0
 def __init__(self,
              name=None,
              controller=None,
              fight=None,
              unit_dict=None,
              complexity=None):
     StandardCreature.__init__(self,
                               name,
                               controller=controller,
                               fight=fight,
                               unit_dict=unit_dict)
     # Максимальные параметры
     self.damage = 2
     self.toughness = 7
     self.max_hp = 5
     self.max_energy = 6
     if unit_dict is None:
         self.abilities = [abilities.Dodge(self), abilities.Muscle(self)]
         self.weapon = weapons.SledgeHammer(self)
     self.energy = int(self.max_energy / 2 + 1)
Пример #6
0
 def __init__(self,
              name=None,
              controller=None,
              fight=None,
              unit_dict=None,
              complexity=None):
     StandardCreature.__init__(self,
                               name,
                               controller=controller,
                               fight=fight,
                               unit_dict=unit_dict)
     # Максимальные параметры
     self.max_hp = 4
     self.toughness = 4
     self.hp = 4
     self.abilities = [abilities.SpellCaster(self), abilities.Dodge(self)]
     if unit_dict is not None:
         self.equip_from_dict(unit_dict)
     self.energy = int(self.max_energy / 2 + 1)
     self.loot_chances['weapon'] = 5
     self.stole = False
Пример #7
0
 def __init__(self,
              name=None,
              controller=None,
              fight=None,
              unit_dict=None,
              complexity=None):
     StandardCreature.__init__(self,
                               name,
                               controller=controller,
                               fight=fight,
                               unit_dict=unit_dict)
     # Максимальные параметры
     self.max_hp = 6
     self.toughness = 8
     self.hp = 6
     self.speed = 13
     self.max_energy = 7
     self.melee_accuracy = 1
     self.weapon = weapons.Cleaver(self)
     if unit_dict is not None:
         self.equip_from_dict(unit_dict)
     self.energy = int(self.max_energy / 2 + 1)
     self.loot_chances['weapon'] = 5
     self.grabbed_target = None
     self.new_ability(ability_name='ogre_grab',
                      ability_func=self.grab,
                      ability_type='instant',
                      cooldown=3,
                      name_tuple=self.to_string('button_1'))
     self.new_ability(ability_name='ogre_charge',
                      ability_func=self.charge,
                      ability_type='instant',
                      name_tuple=self.to_string('button_1'),
                      cooldown=2)
     self.new_ability(ability_name='ogre_throw',
                      ability_func=self.throw,
                      ability_type='instant',
                      name_tuple=self.to_string('button_1'))
Пример #8
0
    def __init__(self,
                 name=None,
                 controller=None,
                 fight=None,
                 unit_dict=None,
                 complexity=None):
        StandardCreature.__init__(self,
                                  name,
                                  controller=controller,
                                  fight=fight,
                                  unit_dict=unit_dict)
        self.unit_name_marker = 'goblin'
        # Максимальные параметры
        self.max_hp = 3
        self.toughness = 3
        self.hp = 3
        self.abilities = [abilities.Dodge(self)]
        self.searching = False
        if unit_dict is not None:
            self.equip_from_dict(unit_dict)
        else:
            if engine.roll_chance(50):
                self.searching = True
            else:
                self.items.append(items.Bomb(self))

        self.energy = int(self.max_energy / 2 + 1)
        self.search_bag_action = self.create_action('search_bag',
                                                    self.search_bag,
                                                    None,
                                                    order=10)
        self.find_item_action = self.create_action('find_item',
                                                   self.find_item,
                                                   None,
                                                   order=10)
        self.item_pool = [(items.Mine, 1), (items.Bomb, 3),
                          (items.ThrowingKnife, 2)]
Пример #9
0
 def __init__(self, name=None, controller=None, fight=None, unit_dict=None, complexity=None):
     StandardCreature.__init__(self, name, controller, fight=fight, unit_dict=unit_dict)
     self.max_hp = 7
     self.hp = 7
     self.energy = 9
     self.max_energy = 9
     self.max_recovery = 9
     self.speed = 20
     self.damage = 3
     self.toughness = 8
     self.tail = weapons.DragonTail(self)
     self.weapon = weapons.BearClaw(self)
     self.default_weapon = weapons.BearClaw(self)
     self.melee_accuracy = 0
     self.range_accuracy = 0
     self.weapons = []
     self.armor = [armors.DragonHide(self)]
     self.breathing = -1
     self.acted = False
     self.new_ability(ability_name='fire_breath', ability_func=self.fire_breath,
                      ability_type='instant',
                      name_tuple=self.to_string('button_1'),
                      cooldown=3)
     self.new_ability(ability_name='wing_clap', ability_func=self.wing_clap,
                      ability_type='instant',
                      name_tuple=self.to_string('button_1'),
                      cooldown=3)
     self.new_ability(ability_name='take_air', ability_func=self.take_air,
                      ability_type='instant',
                      name_tuple=self.to_string('button_1'), ability_order=10)
     self.new_ability(ability_name='tail_whip', ability_func=self.tail_whip,
                      ability_type='target',
                      name_tuple=self.to_string('button_1'),
                      targets=self.tail_targets)
     if unit_dict is not None:
         self.equip_from_dict(unit_dict)
Пример #10
0
 def generate_loot(self):
     if self.stole:
         self.loot_chances['weapon'] = 100
     return StandardCreature.generate_loot(self)
Пример #11
0
 def __init__(self, name=None, controller=None, fight=None, unit_dict=None, complexity=None):
     StandardCreature.__init__(self, name, controller=controller, fight=fight, unit_dict=unit_dict)
     # Максимальные параметры
     if unit_dict is None:
         self.abilities = [abilities.Dodge(self)]
Пример #12
0
 def recovery(self):
     self.acted = False
     return StandardCreature.recovery(self)
Пример #13
0
 def generate_loot(self):
     loot_container = StandardCreature.generate_loot(self)
     loot_container.put(engine.get_random_with_chances(self.item_pool).name)
     return loot_container