Esempio n. 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()
Esempio n. 2
0
 def create_weapon(self, player):
     return Weapon(5,
                   2,
                   effects=[
                       Effect(
                           CharacterAttack(IsHero()),
                           ActionTag(
                               Give(BuffUntil(Immune(), AttackCompleted())),
                               HeroSelector()))
                   ])
Esempio n. 3
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)
Esempio n. 4
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())))
Esempio n. 5
0
 def create_weapon(self, player):
     return Weapon(
         7,
         1,
         effects=[
             Effect(CharacterAttack(And(IsHero(), TargetIsMinion())), [
                 ActionTag(IncreaseDurability(), HeroSelector()),
                 ActionTag(IncreaseWeaponAttack(-1), HeroSelector()),
                 ActionTag(
                     Give(BuffUntil(ChangeAttack(1), AttackCompleted())),
                     HeroSelector())
             ])
         ])
Esempio n. 6
0
    def use(self, player, game):
        super().use(player, game)

        minion = self.target.copy(player)
        minion.active = True
        minion.exhausted = False

        # What happens if there are already 7 minions?
        self.target.remove_from_board()
        minion.add_to_board(len(player.minions))

        # When silenced, the minion should immediately come back to its previous
        # owner.  See https://twitter.com/bdbrode/status/510251195173470208
        minion.add_buff(BuffUntil(Stolen(), TurnEnded()))
Esempio n. 7
0
 def use(self, player, game):
     super().use(player, game)
     self.target.add_buff(BuffUntil(Immune(), TurnEnded(player=CurrentPlayer())))
     self.target.change_temp_attack(2)
Esempio n. 8
0
 def use(self, player, game):
     super().use(player, game)
     for minion in player.minions:
         if not minion.stealth:
             minion.add_buff(BuffUntil(Stealth(), TurnStarted()))
Esempio n. 9
0
 def use(self, player, game):
     super().use(player, game)
     self.target.add_buff(BuffUntil(Stealth(), TurnStarted()))