示例#1
0
 def string(self, string, format_dict=None, order=0):
     lang_tuple = self.to_string(string, format_dict=format_dict)
     if not order:
         self.fight.string_tuple.row(lang_tuple)
     else:
         standart_actions.AddString(lang_tuple=lang_tuple,
                                    unit=self,
                                    order=order)
示例#2
0
 def concentrate(self):
     self.check_combust()
     if self.check_casting():
         standart_actions.AddString(localization.LangTuple('unit_' + self.unit.unit_name,
                                                           'cast',
                                                           format_dict={'actor': self.unit.name}),
                                    order=10,
                                    unit=self.unit)
示例#3
0
 def first_stage(self):
     standart_actions.AddString(localization.LangTuple(
         'abilities_spellcast',
         'use',
         format_dict={
             'actor': self.unit.name,
             'emote': self.emote
         }),
                                order=5,
                                unit=self.unit)
示例#4
0
 def add_armor_string(self):
     for key in self.act_armor_dict:
         armor_string = LangTuple('fight',
                                  'armor',
                                  format_dict={
                                      'actor': self.name,
                                      'damage_blocked':
                                      self.act_armor_dict[key],
                                      'armor': LangTuple('armor', key)
                                  })
         standart_actions.AddString(armor_string, 22, self)
     self.act_armor_dict = {}
示例#5
0
 def activate_special_action(self, target=None):
     self.on_cd()
     targets = [target for target in self.targets()
                if any('attack' in action.action_type for action in target.actions())
                and target.target == self.unit]
     if targets:
         standart_actions.Custom(self.counterattack, targets[0], order=10, unit=self.unit)
     else:
         standart_actions.AddString(localization.LangTuple(self.table_row,
                                                           'special_1_miss', format_dict={'actor': self.unit.name}),
                                    order=0, unit=self.unit)
         self.unit.waste_energy(self.special_energy_cost)
示例#6
0
 def destroy(self):
     standart_actions.AddString(
         localization.LangTuple('armor_' + self.name,
                                'destroyed',
                                format_dict={'name': self.unit.name}), 23,
         self.unit)