コード例 #1
0
ファイル: weapons.py プロジェクト: Jus-ti-car/Veganwars
 def on_hit(self, action):
     if self.melee:
         self.melee = False
     else:
         self.unit.lose_weapon()
         self.unit.lost_weapon.remove(self)
         self.unit.weapon_to_member.append(self)
         self.target = self.unit.target
         statuses.CustomStatus(self.unit, order=0, func=self.go_back, delay=2, permanent=True)
         statuses.CustomStatus(self.unit, order=5, func=self.equip, delay=2)
コード例 #2
0
ファイル: spells.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     statuses.Casting(self.unit, self.id, delay=self.turn_numbers)
     self.unit.waste_energy(self.energy_cost)
     if self.targetable:
         self.target = self.unit.fight[action.info[-2]]
     for turn in range(self.turn_numbers-1):
         statuses.CustomStatus(func=self.concentrate, delay=turn + 1, order=self.order, unit=self.unit,
                               name='{}_stage_{}'.format(turn, self.name), acting=True)
     statuses.CustomStatus(func=self.casting, delay=self.turn_numbers, order=self.order, unit=self.unit,
                           name='cast_spell_{}'.format(self.name), acting=True)
コード例 #3
0
    def grab(self, target):
        if 'dodge' in target.action or 'back' in target.action:
            self.string('skill_8',
                        format_dict={
                            'actor': self.name,
                            'target': target.name
                        })

        else:
            self.string('skill_1',
                        format_dict={
                            'actor': self.name,
                            'target': target.name
                        })
            statuses.CustomStatus(target,
                                  21,
                                  70,
                                  self.tighten,
                                  name='branch-grabbed',
                                  additional_buttons_actions=[
                                      ('free', self.force_free,
                                       LangTuple('unit_' + self.unit_name,
                                                 'button_1'))
                                  ])
            self.move_forward()
            target.rooted.append(self)
            self.state = 'grabbed'
コード例 #4
0
ファイル: items.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     delay = int(action.info[-1])
     statuses.CustomStatus(self.unit,
                           5,
                           delay,
                           self.blow_up,
                           permanent=True)
     self.string('special', format_dict={'actor': self.unit.name})
コード例 #5
0
 def activate(self, action):
     self.start_casting(action, self.turn_numbers)
     statuses.CustomStatus(func=self.first_stage,
                           delay=1,
                           order=self.order,
                           unit=self.unit,
                           acting=True,
                           name='first_stage_{}'.format(self.name))
コード例 #6
0
ファイル: items.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     self.string('use', format_dict={'actor': self.unit.name})
     statuses.Buff(unit=self.unit, attr='damage', length=3, value=3)
     statuses.CustomStatus(unit=self.unit,
                           delay=1,
                           func=self.wear_off,
                           order=40,
                           name='psycho_delay')
コード例 #7
0
ファイル: abilities.py プロジェクト: Jus-ti-car/Veganwars
 def activate(self, action):
     self.string('use', format_dict={'actor': self.actor.name})
     statuses.CustomStatus(self.actor,
                           order=60,
                           delay=2,
                           func=self.call_dog,
                           permanent=True)
     self.dog_called = True
コード例 #8
0
ファイル: abilities.py プロジェクト: Jus-ti-car/Veganwars
 def activate(self, action=None):
     if self.actor.hp <= 0 and not self.stopped:
         self.actor.hp = 1
         if not self.activated:
             self.activated = True
             self.string('use', format_dict={'actor': self.actor.name})
             statuses.CustomStatus(actor=self.actor,
                                   delay=2,
                                   order=40,
                                   func=self.stop)
コード例 #9
0
ファイル: abilities.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     self.on_cd()
     target = action.target
     attack = standart_actions.Attack(self.unit, self.unit.fight)
     shield = next(armor for armor in self.unit.armor
                   if 'shield' in armor.types)
     attack.activate(target=target, weapon=shield)
     self.unit.waste_energy(shield.energy_cost)
     shield.current_coverage = 100
     statuses.CustomStatus(self.unit, 0, 1, self.stop_shield, args=[shield])
コード例 #10
0
ファイル: abilities.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     self.on_cd()
     self.string('special',
                 format_dict={
                     'actor': self.unit.name,
                     'weapon': self.unit.weapon.name_lang_tuple()
                 })
     statuses.CustomStatus(self.unit,
                           4,
                           1,
                           self.cleave,
                           name='attack_modifier_random')
コード例 #11
0
ファイル: abilities.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     statuses.CustomPassive(self.unit,
                            name='control_stop',
                            delay=6,
                            func=self.control_stop)
     statuses.CustomStatus(self.unit,
                           1,
                           6,
                           self.cast_speed,
                           name='cast_speed',
                           emoji=emoji_utils.emote_dict['provoke_em'])
     self.string('use', format_dict={'actor': self.unit.name})
     self.unit.cast_speed += 1
コード例 #12
0
 def start_casting(self, action, turn_numbers):
     statuses.Casting(self.unit, self.id)
     self.unit.waste_energy(self.energy_cost)
     if self.targetable:
         self.target = self.unit.fight[action.info[-2]]
     if turn_numbers > 1:
         statuses.CustomStatus(func=self.second_stage_check,
                               delay=1,
                               order=self.order,
                               unit=self.unit,
                               name='second_stage_{}'.format(self.name))
     if turn_numbers > 2:
         statuses.CustomStatus(func=self.third_stage_check,
                               delay=2,
                               order=self.order,
                               unit=self.unit,
                               name='third_stage_{}'.format(self.name))
     statuses.CustomStatus(func=self.finish,
                           delay=self.turn_numbers,
                           order=60,
                           unit=self.unit,
                           acting=True,
                           name='finish_spell_{}'.format(self.name))
コード例 #13
0
ファイル: items.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     if action.target == self.unit:
         self.string('special',
                     format_dict={
                         'actor': self.unit.name,
                         'target': action.target.name
                     })
     else:
         self.string('use',
                     format_dict={
                         'actor': self.unit.name,
                         'target': action.target.name
                     })
     action.target.change_hp(2)
     action.target.boost_attribute('hp', 2)
     statuses.CustomStatus(unit=action.target,
                           delay=2,
                           func=self.wear_off,
                           order=39)
     statuses.CustomStatus(unit=action.target,
                           delay=3,
                           func=self.wear_off,
                           order=39)
     self.unit = action.target
コード例 #14
0
ファイル: abilities.py プロジェクト: Jus-ti-car/Veganwars
 def activate(self, action=None):
     global_stacks = sum([
         actor.statuses['burning'].stacks
         for actor in self.actor.fight.actors
         if 'burning' in actor.statuses and actor.alive()
     ])
     self.bonus_damage = global_stacks
     if self.bonus_damage:
         self.string('use',
                     format_dict={
                         'actor': self.actor.name,
                         'bonus_damage': self.bonus_damage
                     })
         self.actor.damage += self.bonus_damage
         statuses.CustomStatus(self.actor,
                               delay=1,
                               func=self.delete_bonus,
                               order=40,
                               name='pyromaniac_delay')
コード例 #15
0
ファイル: items.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     if action.target == self.unit:
         self.string('use', format_dict={'actor': self.unit.name})
     else:
         self.string('special',
                     format_dict={
                         'actor': self.unit.name,
                         'target': action.target.name
                     })
     self.unit = action.target
     statuses.PermaStatus(unit=action.target,
                          delay=2,
                          func=self.protect,
                          order=39,
                          name='chitin_protect',
                          acting=True)
     statuses.CustomStatus(unit=action.target,
                           delay=2,
                           func=self.wear_off,
                           order=41,
                           name='chitin_delay')
コード例 #16
0
ファイル: bloodbug.py プロジェクト: egor5q/Veganwars
 def start_regenerating(self):
     statuses.Buff(self, 'damage', 2, 3)
     statuses.CustomStatus(self, 21, 0, self.regenerate, name='custom_{}_{}'.format('regenerate', engine.rand_id()), acting=True)
     statuses.CustomStatus(self, 21, 1, self.regenerate, name='custom_{}_{}'.format('regenerate', engine.rand_id()))
     statuses.CustomStatus(self, 21, 2, self.regenerate, name='custom_{}_{}'.format('regenerate', engine.rand_id()))
     statuses.CustomStatus(self, 22, 2, self.reset_blood, name='custom_{}_{}'.format('blood_reset', engine.rand_id()))
コード例 #17
0
 def crawl_back(self, action):
     action.unit.string('skill_6', format_dict={'actor': action.unit.name})
     action.unit.disabled.append('backing')
     statuses.CustomStatus(action.unit, 1, 1, action.unit.be_back)
コード例 #18
0
ファイル: items.py プロジェクト: egor5q/Veganwars
 def activate(self, action):
     self.string('use', format_dict={'actor': self.unit.name})
     statuses.CustomStatus(unit=self.unit,
                           delay=2,
                           func=self.wear_off,
                           order=41)