Example #1
0
 def __init__(self):
     super().__init__("Cenarius", 9, CHARACTER_CLASS.DRUID, CARD_RARITY.LEGENDARY, choices=[
         Choice(IncreaseStats(), Give([Buff(ChangeAttack(2)),
                                       Buff(ChangeHealth(2)),
                                       Buff(Taunt())]), MinionSelector()),
         Choice(SummonTreants(), Summon(TauntTreant(), 2), PlayerSelector())
     ])
Example #2
0
 def create_weapon(self, player):
     return Weapon(3,
                   2,
                   deathrattle=Deathrattle(
                       Give([Buff(ChangeHealth(2)),
                             Buff(ChangeAttack(2))]),
                       MinionSelector(IsType(MINION_TYPE.MECH),
                                      picker=RandomPicker())))
Example #3
0
 def __init__(self):
     super().__init__("Coghammer",
                      3,
                      CHARACTER_CLASS.PALADIN,
                      CARD_RARITY.EPIC,
                      battlecry=Battlecry(
                          Give([Buff(DivineShield()),
                                Buff(Taunt())]),
                          MinionSelector(picker=RandomPicker())))
Example #4
0
 def __init__(self):
     super().__init__(
         "Quartermaster",
         5,
         CHARACTER_CLASS.PALADIN,
         CARD_RARITY.EPIC,
         battlecry=Battlecry(
             Give([Buff(ChangeAttack(2)),
                   Buff(ChangeHealth(2))]),
             MinionSelector(HasCardName("Silver Hand Recruit"))))
Example #5
0
 def __init__(self):
     super().__init__(
         "Core Rager",
         4,
         CHARACTER_CLASS.HUNTER,
         CARD_RARITY.RARE,
         minion_type=MINION_TYPE.BEAST,
         battlecry=(Battlecry(
             Give([Buff(ChangeAttack(3)),
                   Buff(ChangeHealth(3))]), SelfSelector(),
             Not(GreaterThan(Count(CardSelector()), value=0)))))
Example #6
0
 def create_minion(self, player):
     return Minion(
         4,
         4,
         effects=[
             Effect(
                 CharacterDamaged(And(IsHero(), OwnersTurn())),
                 ActionTag(
                     Give([Buff(ChangeAttack(2)),
                           Buff(ChangeHealth(2))]), SelfSelector()))
         ])
Example #7
0
 def __init__(self):
     super().__init__(
         "Screwjank Clunker",
         4,
         CHARACTER_CLASS.WARRIOR,
         CARD_RARITY.RARE,
         minion_type=MINION_TYPE.MECH,
         battlecry=Battlecry(
             Give([Buff(ChangeHealth(2)),
                   Buff(ChangeAttack(2))]),
             MinionSelector(IsType(MINION_TYPE.MECH), picker=UserPicker())))
Example #8
0
 def __init__(self):
     super().__init__(
         "Alexstrasza's Champion",
         2,
         CHARACTER_CLASS.WARRIOR,
         CARD_RARITY.RARE,
         battlecry=(Battlecry(
             Give([Buff(ChangeAttack(1)),
                   Buff(Charge())]), SelfSelector(),
             GreaterThan(Count(
                 CardSelector(condition=IsType(MINION_TYPE.DRAGON))),
                         value=0))))
Example #9
0
 def create_weapon(self, player):
     return Weapon(
         1,
         5,
         effects=[
             Effect(
                 MinionSummoned(),
                 ActionTag(
                     Give([Buff(ChangeAttack(1)),
                           Buff(ChangeHealth(1))]), TargetSelector())),
             Effect(MinionSummoned(),
                    ActionTag(DecreaseDurability(), WeaponSelector()))
         ])
Example #10
0
 def __init__(self):
     super().__init__("Anodized Robo Cub",
                      2,
                      CHARACTER_CLASS.DRUID,
                      CARD_RARITY.COMMON,
                      minion_type=MINION_TYPE.MECH,
                      choices=[
                          Choice(AttackMode(),
                                 Give([Buff(ChangeAttack(1))]),
                                 SelfSelector()),
                          Choice(TankMode(), Give([Buff(ChangeHealth(1))]),
                                 SelfSelector())
                      ])
Example #11
0
 def create_minion(self, player):
     return Minion(
         2,
         2,
         effects=[
             Effect(
                 TurnEnded(),
                 ActionTag(
                     Give([Buff(ChangeAttack(2)),
                           Buff(ChangeHealth(2))]),
                     MinionSelector(IsType(MINION_TYPE.MECH),
                                    picker=RandomPicker())))
         ])
Example #12
0
    def __init__(self):

        super().__init__("Ancient of War",
                         7,
                         CHARACTER_CLASS.DRUID,
                         CARD_RARITY.EPIC,
                         choices=[
                             Choice(
                                 Health(),
                                 Give([Buff(ChangeHealth(5)),
                                       Buff(Taunt())]), SelfSelector()),
                             Choice(Attack(), Give([Buff(ChangeAttack(5))]),
                                    SelfSelector()),
                         ])
Example #13
0
 def __init__(self):
     super().__init__("Houndmaster",
                      4,
                      CHARACTER_CLASS.HUNTER,
                      CARD_RARITY.FREE,
                      minion_type=MINION_TYPE.NONE,
                      battlecry=Battlecry(
                          Give([
                              Buff(ChangeHealth(2)),
                              Buff(ChangeAttack(2)),
                              Buff(Taunt())
                          ]),
                          MinionSelector(IsType(MINION_TYPE.BEAST),
                                         picker=UserPicker())))
Example #14
0
 def set_attribute(obj, attribute, value):
     from hearthbreaker.tags.status import ManaChange, SetAttack
     if attribute == "damage":
         was_enraged = obj.enraged
         obj.health = max(0, obj.clculate_max_health() - value)
         if value > 0:
             obj.enraged = True
             if not was_enraged:
                 obj._do_enrage()
     elif attribute == 'mana':
         obj.add_buff(Buff(ManaChange(value - obj.mana_cost(None))))
     elif attribute == "attack":
         obj.add_buff(Buff(SetAttack(value)))
     elif attribute == "health":
         obj.set_health_to(value)
Example #15
0
 def use(self, player, game):
     super().use(player, game)
     query = CollectionSource([IsMinion()])
     new_minon = query.get_card(player, player, self)
     new_minon.add_buff(Buff(ManaChange(-3)))
     player.hand.append(new_minon)
     new_minon.attach(new_minon, player)
Example #16
0
 def __init__(self):
     super().__init__("Edwin VanCleef",
                      3,
                      CHARACTER_CLASS.ROGUE,
                      CARD_RARITY.LEGENDARY,
                      battlecry=Battlecry(
                          Give([
                              Buff(
                                  ChangeAttack(
                                      Attribute("cards_played",
                                                PlayerSelector()), 2)),
                              Buff(
                                  ChangeHealth(
                                      Attribute("cards_played",
                                                PlayerSelector()), 2))
                          ]), SelfSelector()))
Example #17
0
    def change_attack(self, amount):
        """
        Change the amount of attack this :class:`Character` has.  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 attack by
        """
        self.add_buff(Buff(ChangeAttack(amount)))
Example #18
0
    def use(self, player, game):
        super().use(player, game)

        self.target.add_buff(Buff(Frozen()))
        index = self.target.index

        if self.target.index < len(self.target.player.minions) - 1:
            minion = self.target.player.minions[index + 1]
            minion.damage(player.effective_spell_damage(1), self)
            minion.add_buff(Buff(Frozen()))

        self.target.damage(player.effective_spell_damage(1), self)

        if self.target.index > 0:
            minion = self.target.player.minions[index - 1]
            minion.damage(player.effective_spell_damage(1), self)
            minion.add_buff(Buff(Frozen()))
Example #19
0
 def create_minion(self, player):
     return Minion(6,
                   9,
                   effects=[
                       Effect(
                           Damaged(),
                           ActionTag(Give(Buff(DoubleAttack())),
                                     SelfSelector()))
                   ])
Example #20
0
 def __init__(self):
     super().__init__(
         "Void Terror",
         3,
         CHARACTER_CLASS.WARLOCK,
         CARD_RARITY.RARE,
         minion_type=MINION_TYPE.DEMON,
         battlecry=(Battlecry(
             Give([
                 Buff(
                     ChangeHealth(
                         Attribute("health", MinionSelector(Adjacent())))),
                 Buff(
                     ChangeAttack(
                         Attribute("attack", MinionSelector(Adjacent()))))
             ]),
             SelfSelector()), Battlecry(Kill(),
                                        MinionSelector(Adjacent()))))
Example #21
0
 def __init__(self):
     super().__init__("Fireguard Destroyer",
                      4,
                      CHARACTER_CLASS.SHAMAN,
                      CARD_RARITY.COMMON,
                      overload=1,
                      battlecry=Battlecry(
                          Give(Buff(ChangeAttack(RandomAmount(1, 4)))),
                          SelfSelector()))
Example #22
0
 def __init__(self):
     super().__init__("Metaltooth Leaper",
                      3,
                      CHARACTER_CLASS.HUNTER,
                      CARD_RARITY.RARE,
                      minion_type=MINION_TYPE.MECH,
                      battlecry=Battlecry(
                          Give(Buff(ChangeAttack(2))),
                          MinionSelector(IsType(MINION_TYPE.MECH))))
Example #23
0
 def use(self, player, game):
     super().use(player, game)
     player.weapon.base_attack += 3
     player.hero.change_temp_attack(3)
     if player.cards_played > 0:
         targets = hearthbreaker.targeting.find_friendly_minion_battlecry_target(player.game, lambda x: x)
         if targets is not None:
             target = player.game.random_choice(targets)
             target.add_buff(Buff(ChangeAttack(3)))
Example #24
0
 def create_weapon(self, player):
     return Weapon(1,
                   3,
                   buffs=[
                       Buff(
                           ChangeAttack(2),
                           GreaterThan(Count(
                               MinionSelector(IsType(MINION_TYPE.MECH))),
                                       value=0))
                   ])
Example #25
0
 def __init__(self):
     super().__init__(
         "Crush",
         7,
         CHARACTER_CLASS.WARRIOR,
         CARD_RARITY.EPIC,
         target_func=hearthbreaker.targeting.find_minion_spell_target,
         buffs=[
             Buff(ManaChange(-4),
                  GreaterThan(Count(MinionSelector(IsDamaged())), value=0))
         ])
Example #26
0
 def __init__(self):
     super().__init__(
         "Volcanic Lumberer",
         9,
         CHARACTER_CLASS.DRUID,
         CARD_RARITY.RARE,
         buffs=[
             Buff(
                 ManaChange(Count(DeadMinionSelector(players=BothPlayer())),
                            -1))
         ])
Example #27
0
    def increase_health(self, amount):
        """
        Increase the amount of  total health this :class:`Character` has.  This is a permanent effect (unless the
        Character is silenced).  This effect will increase both the player's current health and maximum health

        :param int amount: the amount to increase health by
        """

        self.trigger("health_increased", amount)
        self.add_buff(Buff(ChangeHealth(amount)))
        self.trigger("health_changed")
Example #28
0
 def __init__(self):
     super().__init__(
         "Solemn Vigil",
         5,
         CHARACTER_CLASS.PALADIN,
         CARD_RARITY.COMMON,
         buffs=[
             Buff(
                 ManaChange(Count(DeadMinionSelector(players=BothPlayer())),
                            -1))
         ])
Example #29
0
 def __init__(self):
     super().__init__(
         "Dragon's Breath",
         5,
         CHARACTER_CLASS.MAGE,
         CARD_RARITY.COMMON,
         target_func=hearthbreaker.targeting.find_spell_target,
         buffs=[
             Buff(
                 ManaChange(Count(DeadMinionSelector(players=BothPlayer())),
                            -1))
         ])
Example #30
0
 def __init__(self):
     super().__init__(
         "Twilight Whelp",
         1,
         CHARACTER_CLASS.PRIEST,
         CARD_RARITY.COMMON,
         minion_type=MINION_TYPE.DRAGON,
         battlecry=(Battlecry(
             Give(Buff(ChangeHealth(2))), SelfSelector(),
             GreaterThan(Count(
                 CardSelector(condition=IsType(MINION_TYPE.DRAGON))),
                         value=0))))