dvitel/hearthstone huggingface dataset:
Card: Flame of Azzinoth NAME_END 2 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END NIL RARITY_END NIL

Python implementation:
class FlameOfAzzinoth(MinionCard):§    def __init__(self):§        super().__init__("Flame of Azzinoth", 1, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, False)§§    def create_minion(self, player):§        return Minion(2, 1)§
Card: Gnoll NAME_END 2 ATK_END 2 DEF_END 2 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END NIL RARITY_END <b>Taunt</b>

Python implementation:
class Gnoll(MinionCard):§    def __init__(self):§        super().__init__("Gnoll", 2, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, False)§§    def create_minion(self, player):§        return Minion(2, 2, taunt=True)§
Card: Holy Wrath NAME_END -1 ATK_END -1 DEF_END 5 COST_END -1 DUR_END Spell TYPE_END Paladin PLAYER_CLS_END NIL RACE_END Rare RARITY_END Draw a card and deal damage equal to its cost.

Python implementation:
class HolyWrath(SpellCard):§    def __init__(self):§        super().__init__("Holy Wrath", 5, CHARACTER_CLASS.PALADIN, CARD_RARITY.RARE, target_func=hearthbreaker.targeting.find_spell_target)§§    def use(self, player, game):§        super().use(player, game)§§        fatigue = False§        if player.deck.left == 0:§            fatigue = True§§        player.draw()§        if not fatigue:§            cost = player.hand[-1].mana§            self.target.damage(player.effective_spell_damage(cost), self)§
Card: Infernal NAME_END 6 ATK_END 6 DEF_END 6 COST_END -1 DUR_END Minion TYPE_END Warlock PLAYER_CLS_END Demon RACE_END Common RARITY_END NIL

Python implementation:
class Infernal(MinionCard):§    def __init__(self):§        super().__init__("Infernal", 6, CHARACTER_CLASS.WARLOCK, CARD_RARITY.COMMON, False, minion_type=MINION_TYPE.DEMON)§§    def create_minion(self, player):§        return Minion(6, 6)§
Card: Kirin Tor Mage NAME_END 4 ATK_END 3 DEF_END 3 COST_END -1 DUR_END Minion TYPE_END Mage PLAYER_CLS_END NIL RACE_END Rare RARITY_END <b>Battlecry:</b> The next <b>Secret</b> you play this turn costs (0).

Python implementation:
class KirinTorMage(MinionCard):§    def __init__(self):§        super().__init__("Kirin Tor Mage", 3, CHARACTER_CLASS.MAGE, CARD_RARITY.RARE, battlecry=Battlecry(GiveAura([AuraUntil(ManaChange(-100), CardSelector(condition=IsSecret()), CardPlayed(IsSecret()))]), PlayerSelector()))§§    def create_minion(self, player):§        return Minion(4, 3)§
Card: Lightwarden NAME_END 1 ATK_END 2 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Rare RARITY_END Whenever a character is healed, gain +2 Attack.

Python implementation:
class Lightwarden(MinionCard):§    def __init__(self):§        super().__init__("Lightwarden", 1, CHARACTER_CLASS.ALL, CARD_RARITY.RARE)§§    def create_minion(self, player):§        return Minion(1, 2, effects=[Effect(CharacterHealed(player=BothPlayer()), ActionTag(Give(ChangeAttack(2)), SelfSelector()))])§
Card: Mana Wraith NAME_END 2 ATK_END 2 DEF_END 2 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Rare RARITY_END ALL minions cost (1) more.

Python implementation:
class ManaWraith(MinionCard):§    def __init__(self):§        super().__init__("Mana Wraith", 2, CHARACTER_CLASS.ALL, CARD_RARITY.RARE)§§    def create_minion(self, player):§        return Minion(2, 2, auras=[Aura(ManaChange(1), CardSelector(BothPlayer(), IsMinion()))])§
Card: Misdirection NAME_END -1 ATK_END -1 DEF_END 2 COST_END -1 DUR_END Spell TYPE_END Hunter PLAYER_CLS_END NIL RACE_END Rare RARITY_END <b>Secret:</b> When a character attacks your hero, instead he attacks another random character.

Python implementation:
class Misdirection(SecretCard):§    def __init__(self):§        super().__init__("Misdirection", 2, CHARACTER_CLASS.HUNTER, CARD_RARITY.RARE)§§    def activate(self, player):§        player.opponent.bind("character_attack", self._reveal)§§    def deactivate(self, player):§        player.opponent.unbind("character_attack", self._reveal)§§    def _reveal(self, character, target):§        if isinstance(target, Hero) and not character.removed:§            game = character.player.game§            possibilities = copy.copy(game.current_player.minions)§            possibilities.extend(game.other_player.minions)§            possibilities.append(game.current_player.hero)§            possibilities.append(game.other_player.hero)§            possibilities.remove(character.current_target)§            character.current_target = game.random_choice(possibilities)§§            super().reveal()§
Card: Noble Sacrifice NAME_END -1 ATK_END -1 DEF_END 1 COST_END -1 DUR_END Spell TYPE_END Paladin PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Secret:</b> When an enemy attacks, summon a 2/1 Defender as the new target.

Python implementation:
class NobleSacrifice(SecretCard):§    def __init__(self):§        super().__init__("Noble Sacrifice", 1, CHARACTER_CLASS.PALADIN, CARD_RARITY.COMMON)§§    def _reveal(self, attacker, target):§        player = attacker.player.game.other_player§        if len(player.minions) < 7 and not attacker.removed:§            from hearthbreaker.cards.minions.paladin import DefenderMinion§            defender = DefenderMinion()§            defender.summon(player, player.game, len(player.minions))§            attacker.current_target = player.minions[-1]§            super().reveal()§§    def activate(self, player):§        player.opponent.bind("character_attack", self._reveal)§§    def deactivate(self, player):§        player.opponent.unbind("character_attack", self._reveal)§
Card: Power of the Wild NAME_END -1 ATK_END -1 DEF_END 2 COST_END -1 DUR_END Spell TYPE_END Druid PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Choose One</b> - Give your minions +1/+1; or Summon a 3/2 Panther.

Python implementation:
class PowerOfTheWild(SpellCard):§    def __init__(self):§        super().__init__("Power of the Wild", 2, CHARACTER_CLASS.DRUID, CARD_RARITY.COMMON)§§    def use(self, player, game):§        super().use(player, game)§        option = player.agent.choose_option([LeaderOfThePack(), SummonPanther()], player)§        option.use(player, game)§
Card: Redemption NAME_END -1 ATK_END -1 DEF_END 1 COST_END -1 DUR_END Spell TYPE_END Paladin PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Secret:</b> When one of your minions dies, return it to life with 1 Health.

Python implementation:
class Redemption(SecretCard):§    def __init__(self):§        super().__init__("Redemption", 1, CHARACTER_CLASS.PALADIN, CARD_RARITY.COMMON)§§    def _reveal(self, minion, by):§        resurrection = minion.card.summon(minion.player, minion.game, min(minion.index, len(minion.player.minions)))§        if resurrection:§            resurrection.health = 1§            super().reveal()§§    def activate(self, player):§        player.bind("minion_died", self._reveal)§§    def deactivate(self, player):§        player.unbind("minion_died", self._reveal)§
Card: Shadow Madness NAME_END -1 ATK_END -1 DEF_END 4 COST_END -1 DUR_END Spell TYPE_END Priest PLAYER_CLS_END NIL RACE_END Rare RARITY_END Gain control of an enemy minion with 3 or less Attack until end of turn.

Python implementation:
class ShadowMadness(SpellCard):§    def __init__(self):§        super().__init__("Shadow Madness", 4, CHARACTER_CLASS.PRIEST, CARD_RARITY.RARE, target_func=hearthbreaker.targeting.find_enemy_minion_spell_target, filter_func=lambda target: target.calculate_attack() <= 3 and target.spell_targetable())§§    def use(self, player, game):§§        super().use(player, game)§§        minion = self.target.copy(player)§        minion.active = True§        minion.exhausted = False§§        self.target.remove_from_board()§        minion.add_to_board(len(player.minions))§§        minion.add_buff(BuffUntil(Stolen(), TurnEnded()))§§    def can_use(self, player, game):§        return super().can_use(player, game) and len(player.minions) < 7§
Card: Siphon Soul NAME_END -1 ATK_END -1 DEF_END 6 COST_END -1 DUR_END Spell TYPE_END Warlock PLAYER_CLS_END NIL RACE_END Rare RARITY_END Destroy a minion. Restore #3 Health to your hero.

Python implementation:
class SiphonSoul(SpellCard):§    def __init__(self):§        super().__init__("Siphon Soul", 6, CHARACTER_CLASS.WARLOCK, CARD_RARITY.RARE, target_func=hearthbreaker.targeting.find_minion_spell_target)§§    def use(self, player, game):§        super().use(player, game)§        self.target.die(self)§        player.hero.heal(player.effective_heal_power(3), self)§
Card: Spellbender NAME_END 1 ATK_END 3 DEF_END 0 COST_END -1 DUR_END Minion TYPE_END Mage PLAYER_CLS_END NIL RACE_END Epic RARITY_END NIL

Python implementation:
class Spellbender(SecretCard):§    def __init__(self):§        super().__init__("Spellbender", 3, CHARACTER_CLASS.MAGE, CARD_RARITY.EPIC)§        self.player = None§§    def _reveal(self, card, index):§        if card.is_spell() and len(self.player.minions) < 7 and card.target and card.target.is_minion():§            SpellbenderMinion().summon(self.player, self.player.game, len(self.player.minions))§            card.target = self.player.minions[-1]§            super().reveal()§§    def activate(self, player):§        player.game.current_player.bind("card_played", self._reveal)§        self.player = player§§    def deactivate(self, player):§        player.game.current_player.unbind("card_played", self._reveal)§        self.player = None§
Card: Summoning Portal NAME_END 0 ATK_END 4 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Warlock PLAYER_CLS_END NIL RACE_END Common RARITY_END Your minions cost (2) less, but not less than (1).

Python implementation:
class SummoningPortal(MinionCard):§    def __init__(self):§        super().__init__("Summoning Portal", 4, CHARACTER_CLASS.WARLOCK, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(0, 4, auras=[Aura(ManaChange(-2, 1, minimum=1), CardSelector(condition=IsMinion()))])§
Card: Thrallmar Farseer NAME_END 2 ATK_END 3 DEF_END 3 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Windfury</b>

Python implementation:
class ThrallmarFarseer(MinionCard):§    def __init__(self):§        super().__init__("Thrallmar Farseer", 3, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(2, 3, windfury=True)§
Card: Upgrade! NAME_END -1 ATK_END -1 DEF_END 1 COST_END -1 DUR_END Spell TYPE_END Warrior PLAYER_CLS_END NIL RACE_END Rare RARITY_END If you have a weapon, give it +1/+1. Otherwise equip a 1/3 weapon.

Python implementation:
class Upgrade(SpellCard):§    def __init__(self):§        super().__init__("Upgrade!", 1, CHARACTER_CLASS.WARRIOR, CARD_RARITY.RARE)§§    def use(self, player, game):§        super().use(player, game)§        from hearthbreaker.cards.weapons.warrior import HeavyAxe§        if player.weapon:§            player.weapon.durability += 1§            player.weapon.base_attack += 1§        else:§            heavy_axe = HeavyAxe().create_weapon(player)§            heavy_axe.equip(player)§
Card: Wisp NAME_END 1 ATK_END 1 DEF_END 0 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END NIL

Python implementation:
class Wisp(MinionCard):§    def __init__(self):§        super().__init__("Wisp", 0, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(1, 1)§
Card: Black Whelp NAME_END 2 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Dragon RACE_END Common RARITY_END NIL

Python implementation:
class BlackWhelp(MinionCard):§    def __init__(self):§        super().__init__("Black Whelp", 1, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, False, MINION_TYPE.DRAGON)§§    def create_minion(self, player):§        return Minion(2, 1)§
Card: Dragonkin Sorcerer NAME_END 3 ATK_END 5 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Dragon RACE_END Common RARITY_END Whenever <b>you</b> target this minion with a spell, gain +1/+1.

Python implementation:
class DragonkinSorcerer(MinionCard):§    def __init__(self):§        super().__init__("Dragonkin Sorcerer", 4, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, minion_type=MINION_TYPE.DRAGON)§§    def create_minion(self, player):§        return Minion(3, 5, effects=[Effect(SpellTargeted(), [ActionTag(Give([Buff(ChangeAttack(1)), Buff(ChangeHealth(1))]), SelfSelector())])])§
Card: Hungry Dragon NAME_END 5 ATK_END 6 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Dragon RACE_END Common RARITY_END <b>Battlecry:</b> Summon a random 1-Cost minion for your opponent.

Python implementation:
class HungryDragon(MinionCard):§    def __init__(self):§        super().__init__("Hungry Dragon", 4, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, minion_type=MINION_TYPE.DRAGON, battlecry=(Battlecry(Summon(CardQuery(conditions=[ManaCost(1), IsMinion()])), PlayerSelector(EnemyPlayer()))))§§    def create_minion(self, player):§        return Minion(5, 6)§
Card: Solemn Vigil NAME_END -1 ATK_END -1 DEF_END 5 COST_END -1 DUR_END Spell TYPE_END Paladin PLAYER_CLS_END NIL RACE_END Common RARITY_END Draw 2 cards. Costs (1) less for each minion that died this turn.

Python implementation:
class SolemnVigil(SpellCard):§    def __init__(self):§        super().__init__("Solemn Vigil", 5, CHARACTER_CLASS.PALADIN, CARD_RARITY.COMMON, buffs=[Buff(ManaChange(Count(DeadMinionSelector(players=BothPlayer())), -1))])§§    def use(self, player, game):§        super().use(player, game)§        for n in range(0, 2):§            player.draw()§