Example #1
0
 def _reveal(self, character, attacker, amount):
     if character.is_hero():
         if character.health - amount <= 0:
             character.add_buff(
                 BuffUntil(Immune(), TurnEnded(player=CurrentPlayer())))
             # TODO Check if this spell will also prevent damage to armor.
             super().reveal()
Example #2
0
    def change_temp_attack(self, amount):
        """
        Change the amount of attack this :class:`Character` has on this turn only.  The amount can be either positive
        or negative. This method will automatically undo its effect when silenced, and re-apply its effect when copied

        :param int amount: The amount to change the temporary attack by
        """
        self.add_buff(
            BuffUntil(ChangeAttack(amount), TurnEnded(player=CurrentPlayer())))
        self.trigger("attack_changed", amount)
Example #3
0
 def __init__(self):
     super().__init__("Shrinkmeister",
                      2,
                      CHARACTER_CLASS.PRIEST,
                      CARD_RARITY.COMMON,
                      battlecry=Battlecry(
                          Give(
                              BuffUntil(ChangeAttack(-2),
                                        TurnEnded(player=CurrentPlayer()))),
                          MinionSelector(players=BothPlayer(),
                                         picker=UserPicker())))
Example #4
0
 def use(self, player, game):
     super().use(player, game)
     self.target.add_aura(
         AuraUntil(Immune(), SelfSelector(),
                   TurnEnded(player=CurrentPlayer())))
     self.target.change_temp_attack(2)