예제 #1
0
 def run(self, target, **kwargs):
     targets = ext.collect_1p_minions(self,
                                      oop=True,
                                      player_id=1 - self.player_id)
     return [
         std_events.AreaDamage(self.game, self, targets,
                               [self.dh_values[0] for _ in targets])
     ]
예제 #2
0
 def run(self, target, **kwargs):
     enemies = ext.collect_1p(self, oop=True, player_id=1 - self.player_id)
     friends = ext.collect_1p(self, oop=True, player_id=self.player_id)
     return [
         std_events.AreaDamage(self.game, self, enemies,
                               [self.dh_values[0] for _ in enemies]),
         std_events.AreaHealing(self.game, self, friends,
                                [self.dh_values[1] for _ in friends]),
     ]
예제 #3
0
    def run(self, target, **kwargs):
        """Deal damage in random order.

        See <https://hearthstone.gamepedia.com/Damage#Advanced_rules> and its explanation on "Multi-Shot" for details.
        """
        zone = self.game.get_zone(Zone.Play, 1 - self.player_id)
        if len(zone) == 0:
            return []
        elif len(zone) < 2:
            real_targets = zone
        else:
            real_targets = random.sample(zone, 2)
        return [std_events.AreaDamage(self.game, self, real_targets, [self.dh_values[0] for _ in real_targets])]
예제 #4
0
    def run(self, target, **kwargs):
        """See <https://hearthstone.gamepedia.com/Swipe#Notes> for more details.

        Like most area of effect damaging effect, Swipe deals all its damage before any on-damage
        triggered effects are activated. However, Swipe creates Damage Events in an unusual order:
        first for the targeted character, and then for all other enemy characters in reverse order
        of play; then, all Damage Events are resolved in the same order.
        """
        targets = [target]
        values = [self.dh_values[0]]

        for entity in order_of_play(
                chain(self.game.get_zone(Zone.Play, 1 - self.player_id),
                      self.game.get_zone(Zone.Hero, 1 - self.player_id)), reverse=True):
            if entity is target:
                continue
            targets.append(entity)
            values.append(self.dh_values[1])

        return [std_events.AreaDamage(self.game, self, targets, values)]
예제 #5
0
 def run(self, target, **kwargs):
     targets = ext.collect_all_minions(self, False, oop=True)
     return [
         std_events.AreaDamage(self.game, self, targets,
                               [self.dh_values[0] for _ in targets])
     ]
예제 #6
0
 def process(self, event: respond[0]):
     if event.card is not self.owner:
         return []
     targets = ext.collect_all(self, except_self=False, oop=True)
     return [std_events.AreaDamage(self.game, self.owner, targets, [2 for _ in targets])]
예제 #7
0
 def run_battlecry(self, target, **kwargs):
     targets = ext.collect_all(self, oop=True, except_list=(self, ))
     return [
         std_events.AreaDamage(self.game, self, targets,
                               [1 for _ in targets])
     ]