dvitel/hearthstone huggingface dataset:
Card: Flare 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 All minions lose <b>Stealth</b>. Destroy all enemy <b>Secrets</b>. Draw a card.

Python implementation:
class Flare(SpellCard):§    def __init__(self):§        super().__init__("Flare", 2, CHARACTER_CLASS.HUNTER, CARD_RARITY.RARE)§§    def use(self, player, game):§        super().use(player, game)§        for minion in hearthbreaker.targeting.find_minion_spell_target(game, lambda m: m.stealth):§            minion.stealth = False§§        for secret in game.other_player.secrets:§            secret.deactivate(game.other_player)§§        game.other_player.secrets = []§        player.draw()§
Card: Gorehowl NAME_END 7 ATK_END -1 DEF_END 7 COST_END 1 DUR_END Weapon TYPE_END Warrior PLAYER_CLS_END NIL RACE_END Epic RARITY_END Attacking a minion costs 1 Attack instead of 1 Durability.

Python implementation:
class Gorehowl(WeaponCard):§    def __init__(self):§        super().__init__("Gorehowl", 7, CHARACTER_CLASS.WARRIOR, CARD_RARITY.EPIC)§§    def create_weapon(self, player):§        return Weapon(7, 1, effects=[Effect(CharacterAttack(And(IsHero(), TargetIsMinion())), [ActionTag(IncreaseDurability(), WeaponSelector()), ActionTag(IncreaseWeaponAttack(-1), WeaponSelector()), ActionTag(Give(BuffUntil(ChangeAttack(1), AttackCompleted())), HeroSelector())])])§
Card: Hound NAME_END 1 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Hunter PLAYER_CLS_END Beast RACE_END NIL RARITY_END <b>Charge</b>

Python implementation:
class Hound(MinionCard):§    def __init__(self):§        super().__init__("Hound", 1, CHARACTER_CLASS.HUNTER, CARD_RARITY.COMMON, False, minion_type=MINION_TYPE.BEAST)§§    def create_minion(self, player):§        return Minion(1, 1, charge=True)§
Card: Injured Blademaster NAME_END 4 ATK_END 7 DEF_END 3 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Rare RARITY_END <b>Battlecry:</b> Deal 4 damage to HIMSELF.

Python implementation:
class InjuredBlademaster(MinionCard):§    def __init__(self):§        super().__init__("Injured Blademaster", 3, CHARACTER_CLASS.ALL, CARD_RARITY.RARE, battlecry=Battlecry(Damage(4), SelfSelector()))§§    def create_minion(self, player):§        return Minion(4, 7)§
Card: Knife Juggler NAME_END 3 ATK_END 2 DEF_END 2 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Rare RARITY_END After you summon a minion, deal 1 damage to a random enemy.

Python implementation:
class KnifeJuggler(MinionCard):§    def __init__(self):§        super().__init__("Knife Juggler", 2, CHARACTER_CLASS.ALL, CARD_RARITY.RARE)§§    def create_minion(self, player):§        return Minion(3, 2, effects=[Effect(AfterAdded(), ActionTag(Damage(1), CharacterSelector(players=EnemyPlayer(), picker=RandomPicker(), condition=None)))])§
Card: Lightwell NAME_END 0 ATK_END 5 DEF_END 2 COST_END -1 DUR_END Minion TYPE_END Priest PLAYER_CLS_END NIL RACE_END Rare RARITY_END At the start of your turn, restore 3 Health to a damaged friendly character.

Python implementation:
class Lightwell(MinionCard):§    def __init__(self):§        super().__init__("Lightwell", 2, CHARACTER_CLASS.PRIEST, CARD_RARITY.RARE)§§    def create_minion(self, player):§        return Minion(0, 5, effects=[Effect(TurnStarted(), ActionTag(Heal(3), CharacterSelector(condition=IsDamaged(), picker=RandomPicker())))])§
Card: Mana Wyrm NAME_END 1 ATK_END 3 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Mage PLAYER_CLS_END NIL RACE_END Common RARITY_END Whenever you cast a spell, gain +1 Attack.

Python implementation:
class ManaWyrm(MinionCard):§    def __init__(self):§        super().__init__("Mana Wyrm", 1, CHARACTER_CLASS.MAGE, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(1, 3, effects=[Effect(SpellCast(), ActionTag(Give(ChangeAttack(1)), SelfSelector()))])§
Card: Mogu'shan Warden NAME_END 1 ATK_END 7 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Taunt</b>

Python implementation:
class MogushanWarden(MinionCard):§    def __init__(self):§        super().__init__("Mogu'shan Warden", 4, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(1, 7, taunt=True)§
Card: Nourish NAME_END -1 ATK_END -1 DEF_END 5 COST_END -1 DUR_END Spell TYPE_END Druid PLAYER_CLS_END NIL RACE_END Rare RARITY_END <b>Choose One</b> - Gain 2 Mana Crystals; or Draw 3 cards.

Python implementation:
class Nourish(SpellCard):§    def __init__(self):§        super().__init__("Nourish", 5, CHARACTER_CLASS.DRUID, CARD_RARITY.RARE)§§    def use(self, player, game):§        super().use(player, game)§§        class Gain2(ChoiceCard):§§            def __init__(self):§                super().__init__("Gain 2 mana crystals", 0, CHARACTER_CLASS.DRUID, CARD_RARITY.COMMON, False)§§            def use(self, player, game):§                if player.max_mana < 8:§                    player.max_mana += 2§                    player.mana += 2§                else:§                    player.max_mana = 10§                    player.mana += 2§§        class Draw3(ChoiceCard):§§            def __init__(self):§                super().__init__("Draw three cards", 0, CHARACTER_CLASS.DRUID, CARD_RARITY.COMMON, False)§§            def use(self, player, game):§                player.draw()§                player.draw()§                player.draw()§§        option = player.agent.choose_option([Gain2(), Draw3()], player)§        option.use(player, game)§
Card: Preparation NAME_END -1 ATK_END -1 DEF_END 0 COST_END -1 DUR_END Spell TYPE_END Rogue PLAYER_CLS_END NIL RACE_END Epic RARITY_END The next spell you cast this turn costs (3) less.

Python implementation:
class Preparation(SpellCard):§    def __init__(self):§        super().__init__("Preparation", 0, CHARACTER_CLASS.ROGUE, CARD_RARITY.EPIC)§§    def use(self, player, game):§        super().use(player, game)§        player.add_aura(AuraUntil(ManaChange(-3), CardSelector(condition=IsSpell()), SpellCast()))§
Card: Repentance 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 your opponent plays a minion, reduce its Health to 1.

Python implementation:
class Repentance(SecretCard):§    def __init__(self):§        super().__init__("Repentance", 1, CHARACTER_CLASS.PALADIN, CARD_RARITY.COMMON)§§    def _reveal(self, minion):§§        minion.set_health_to(1)§        super().reveal()§§    def activate(self, player):§        player.game.current_player.bind("minion_played", self._reveal)§§    def deactivate(self, player):§        player.game.current_player.unbind("minion_played", self._reveal)§
Card: Shadow of Nothing NAME_END 0 ATK_END 1 DEF_END 0 COST_END -1 DUR_END Minion TYPE_END Priest PLAYER_CLS_END NIL RACE_END Epic RARITY_END Mindgames whiffed! Your opponent had no minions!

Python implementation:
class ShadowOfNothing(MinionCard):§    def __init__(self):§        super().__init__("Shadow of Nothing", 0, CHARACTER_CLASS.PRIEST, CARD_RARITY.EPIC, False)§§    def create_minion(self, p):§        return Minion(0, 1)§
Card: Slam NAME_END -1 ATK_END -1 DEF_END 2 COST_END -1 DUR_END Spell TYPE_END Warrior PLAYER_CLS_END NIL RACE_END Common RARITY_END Deal $2 damage to a minion. If it survives, draw a card.

Python implementation:
class Slam(SpellCard):§    def __init__(self):§        super().__init__("Slam", 2, CHARACTER_CLASS.WARRIOR, CARD_RARITY.COMMON, target_func=hearthbreaker.targeting.find_minion_spell_target)§§    def use(self, player, game):§        super().use(player, game)§        if self.target.health > player.effective_spell_damage(2) or self.target.divine_shield:§            self.target.damage(player.effective_spell_damage(2), self)§            player.draw()§        else:§            self.target.damage(player.effective_spell_damage(2), self)§
Card: Spellbreaker NAME_END 4 ATK_END 3 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Battlecry:</b> <b>Silence</b> a minion.

Python implementation:
class Spellbreaker(MinionCard):§    def __init__(self):§        super().__init__("Spellbreaker", 4, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, minion_type=MINION_TYPE.NONE, battlecry=Battlecry(Silence(), MinionSelector(players=BothPlayer(), picker=UserPicker())))§§    def create_minion(self, player):§        return Minion(4, 3)§
Card: Sunfury Protector NAME_END 2 ATK_END 3 DEF_END 2 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Rare RARITY_END <b>Battlecry:</b> Give adjacent minions <b>Taunt</b>.

Python implementation:
class SunfuryProtector(MinionCard):§    def __init__(self):§        super().__init__("Sunfury Protector", 2, CHARACTER_CLASS.ALL, CARD_RARITY.RARE, battlecry=Battlecry(Give(Buff(Taunt())), MinionSelector(Adjacent())))§§    def create_minion(self, player):§        return Minion(2, 3)§
Card: Tinkmaster Overspark NAME_END 3 ATK_END 3 DEF_END 3 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Legendary RARITY_END <b>Battlecry:</b> Transform another random minion into a 5/5 Devilsaur or a 1/1 Squirrel.

Python implementation:
class TinkmasterOverspark(MinionCard):§    def __init__(self):§        super().__init__("Tinkmaster Overspark", 3, CHARACTER_CLASS.ALL, CARD_RARITY.LEGENDARY, battlecry=Battlecry(Transform(CardQuery(source=CARD_SOURCE.LIST, source_list=[Devilsaur(), Squirrel()])), MinionSelector(players=BothPlayer(), picker=RandomPicker())))§§    def create_minion(self, player):§        return Minion(3, 3)§
Card: Vaporize NAME_END -1 ATK_END -1 DEF_END 3 COST_END -1 DUR_END Spell TYPE_END Mage PLAYER_CLS_END NIL RACE_END Rare RARITY_END <b>Secret:</b> When a minion attacks your hero, destroy it.

Python implementation:
class Vaporize(SecretCard):§    def __init__(self):§        super().__init__("Vaporize", 3, CHARACTER_CLASS.MAGE, CARD_RARITY.RARE)§§    def _reveal(self, attacker, target):§        if target is self.player.hero and attacker.is_minion() and not attacker.removed:§            attacker.die(self)§            attacker.game.check_delayed()§            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: Worgen Infiltrator NAME_END 2 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Stealth</b>

Python implementation:
class WorgenInfiltrator(MinionCard):§    def __init__(self):§        super().__init__("Worgen Infiltrator", 1, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(2, 1, stealth=True)§
Card: Blackwing Corruptor NAME_END 5 ATK_END 4 DEF_END 5 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Battlecry</b>: If you're holding a Dragon, deal 3 damage.

Python implementation:
class BlackwingCorruptor(MinionCard):§    def __init__(self):§        super().__init__("Blackwing Corruptor", 5, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, battlecry=Battlecry(Damage(3), CharacterSelector(players=BothPlayer(), picker=UserPicker()), GreaterThan(Count(CardSelector(condition=IsType(MINION_TYPE.DRAGON))), value=0)))§§    def create_minion(self, player):§        return Minion(5, 4)§
Card: Drakonid Crusher NAME_END 6 ATK_END 6 DEF_END 6 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Dragon RACE_END Common RARITY_END <b>Battlecry:</b> If your opponent has 15 or less Health, gain +3/+3.

Python implementation:
class DrakonidCrusher(MinionCard):§    def __init__(self):§        super().__init__("Drakonid Crusher", 6, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, minion_type=MINION_TYPE.DRAGON, battlecry=(Battlecry(Give([Buff(ChangeAttack(3)), Buff(ChangeHealth(3))]), SelfSelector(), Not(GreaterThan(Attribute('health', HeroSelector(EnemyPlayer())), value=15)))))§§    def create_minion(self, player):§        return Minion(6, 6)§
Card: Imp NAME_END 1 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Warlock PLAYER_CLS_END Demon RACE_END NIL RARITY_END NIL

Python implementation:
class Imp(MinionCard):§    def __init__(self):§        super().__init__("Imp", 1, CHARACTER_CLASS.ALL, CARD_RARITY.RARE, False, minion_type=MINION_TYPE.DEMON)§§    def create_minion(self, player):§        return Minion(1, 1)§
Card: Twilight Whelp NAME_END 2 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Priest PLAYER_CLS_END Dragon RACE_END Common RARITY_END <b>Battlecry:</b> If you're holding a Dragon, gain +2 Health.

Python implementation:
class TwilightWhelp(MinionCard):§    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))))§§    def create_minion(self, player):§        return Minion(2, 1)§