Esempio n. 1
0
 def __init__(self, fight):
     Ai.__init__(self, fight)
     self.action_pattern_dict = {'default': self.default_weapon_actions,
                                 'fist': self.snatch_weapon_action,
                                 'bow': self.bow_weapon_actions,
                                 'crossbow': self.crossbow_weapon_actions,
                                 'harpoon': self.harpoon_weapon_actions}
Esempio n. 2
0
 def __init__(self, fight):
     Ai.__init__(self, fight)
     self.item_action_dict = {
         'throwknife': self.use_throwing_knife,
         'bomb': self.use_bomb,
         'mine': self.use_mine
     }
Esempio n. 3
0
 def __init__(self, fight):
     Ai.__init__(self, fight)
     self.fire_storm = (emote_dict['earth_em'], emote_dict['random_em'],
                        emote_dict['ignite_em'])
     self.flash = (emote_dict['palm_em'], emote_dict['ignite_em'])
     self.ignite = (emote_dict['ignite_em'], )
     self.strong_ignite = (emote_dict['strength_em'],
                           emote_dict['ignite_em'])
Esempio n. 4
0
 def get_action(self, edit=False):
     action = Ai.get_action(self, edit=edit)
     self.unit.acted = True
     if action.name == 'ability':
         if action.ability.name == 'wing_clap':
             return
         if action.ability.name == 'take_air':
             self.unit.breathing = self.fight.turn
     if self.unit.energy > 2 and self.unit.hp < self.unit.max_hp/2:
         Ai.get_action(self, edit=edit)
         if action.name == 'ability':
             if action.ability.name == 'take_air':
                 self.unit.breathing = self.fight.turn
Esempio n. 5
0
 def __init__(self, fight):
     Ai.__init__(self, fight)
     self.action_pattern_dict = {
         'default':
         self.default_weapon_action,
         'sledgehammer':
         self.sledgehammer_weapon_action,
         'dodge':
         lambda: self.action_ability(
             'dodge', self.unit.max_energy - self.unit.energy
             if self.state == 'victim' else 0)
     }
     self.state = None
Esempio n. 6
0
    def get_action(self, edit=False):
        action = Ai.get_action(self, edit=edit)
        if action.name == 'ability':
            if action.ability.name is 'ogre_charge':
                self.unit.target = random.choice([
                    trgt for trgt in self.unit.targets()
                    if trgt not in self.unit.melee_targets
                ])
                # self.unit.announce(self.unit.to_string('skill_2', format_dict={'target': self.unit.target.name}))
                return
            elif action.ability.name is 'ogre_grab':
                # self.unit.announce(self.unit.to_string('skill_2', format_dict={'target': self.unit.target.name}))
                return

        elif engine.roll_chance(50) and action.name == 'melee_reload':
            self.unit.announce(self.unit.to_string('skill_1'))
Esempio n. 7
0
 def __init__(self, fight):
     Ai.__init__(self, fight)
     self.skeleton_summoned = 0
     self.unit.chain_turn = 0
Esempio n. 8
0
 def __init__(self, fight):
     Ai.__init__(self, fight)
Esempio n. 9
0
 def __init__(self, fight):
     Ai.__init__(self, fight)
     self.weapon_ai_dict = {
         'default': self.default_weapon_actions,
         'bow': self.bow_weapon_actions
     }