dvitel/hearthstone huggingface dataset:
Card: Blingtron 3000 NAME_END 3 ATK_END 4 DEF_END 5 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END Legendary RARITY_END <b>Battlecry:</b> Equip a random weapon for each player.

Python implementation:
class Blingtron3000(MinionCard):§    def __init__(self):§        super().__init__("Blingtron 3000", 5, CHARACTER_CLASS.ALL, CARD_RARITY.LEGENDARY, minion_type=MINION_TYPE.MECH, battlecry=Battlecry(Equip(CardQuery(conditions=[IsWeapon()])), PlayerSelector(players=BothPlayer())))§§    def create_minion(self, player):§        return Minion(3, 4)§
Card: Bolvar Fordragon NAME_END 1 ATK_END 7 DEF_END 5 COST_END -1 DUR_END Minion TYPE_END Paladin PLAYER_CLS_END NIL RACE_END Legendary RARITY_END Whenever a friendly minion dies while this is in your hand, gain +1 Attack.

Python implementation:
class BolvarFordragon(MinionCard):§    def __init__(self):§        super().__init__("Bolvar Fordragon", 5, CHARACTER_CLASS.PALADIN, CARD_RARITY.LEGENDARY, effects=[Effect(MinionDied(), ActionTag(Give(ChangeAttack(1)), SelfSelector()))])§§    def create_minion(self, player):§        return Minion(1, 7)§
Card: Bomb Lobber NAME_END 3 ATK_END 3 DEF_END 5 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 a random enemy minion.

Python implementation:
class BombLobber(MinionCard):§    def __init__(self):§        super().__init__("Bomb Lobber", 5, CHARACTER_CLASS.ALL, CARD_RARITY.RARE, battlecry=Battlecry(Damage(4), MinionSelector(None, EnemyPlayer(), RandomPicker())))§§    def create_minion(self, player):§        return Minion(3, 3)§
Card: Boom Bot NAME_END 1 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END NIL RARITY_END <b>Deathrattle</b>: Deal 1-4 damage to a random enemy.

Python implementation:
class BoomBot(MinionCard):§    def __init__(self):§        super().__init__("Boom Bot", 1, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, False, minion_type=MINION_TYPE.MECH)§§    def create_minion(self, player):§        return Minion(1, 1, deathrattle=Deathrattle(Damage(RandomAmount(1, 4)), CharacterSelector(players=EnemyPlayer(), picker=RandomPicker())))§
Card: Bouncing Blade NAME_END -1 ATK_END -1 DEF_END 3 COST_END -1 DUR_END Spell TYPE_END Warrior PLAYER_CLS_END NIL RACE_END Epic RARITY_END Deal $1 damage to a random minion. Repeat until a minion dies.

Python implementation:
class BouncingBlade(SpellCard):§    def __init__(self):§        super().__init__("Bouncing Blade", 3, CHARACTER_CLASS.WARRIOR, CARD_RARITY.EPIC)§§    def can_use(self, player, game):§        return super().can_use(player, game) and len(player.minions) + len(player.opponent.minions) >= 1§§    def use(self, player, game):§        super().use(player, game)§§        targets = player.minions[:] + player.opponent.minions[:]§        if len(targets):§            for bounces in range(80):§                target = game.random_choice(targets)§                target.damage(player.effective_spell_damage(1), self)§                if target.dead:§                    break§
Card: Call Pet 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 Draw a card. NL If it's a Beast, it costs (4) less.

Python implementation:
class CallPet(SpellCard):§    def __init__(self):§        super().__init__("Call Pet", 2, CHARACTER_CLASS.HUNTER, CARD_RARITY.RARE)§§    def use(self, player, game):§        def reduce_cost(card):§            if card.is_minion() and card.minion_type == MINION_TYPE.BEAST:§                card.add_buff(Buff(ManaChange(-4)))§§        super().use(player, game)§        player.bind_once("card_drawn", reduce_cost)§        player.draw()§
Card: Chicken NAME_END 1 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Beast RACE_END NIL RARITY_END NIL

Python implementation:
class Chicken(MinionCard):§    def __init__(self):§        super().__init__("Chicken", 0, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, False, MINION_TYPE.BEAST)§§    def create_minion(self, p):§        return Minion(1, 1)§
Card: Clockwork Giant NAME_END 8 ATK_END 8 DEF_END 12 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END Epic RARITY_END Costs (1) less for each card in your opponent's hand.

Python implementation:
class ClockworkGiant(MinionCard):§    def __init__(self):§        super().__init__("Clockwork Giant", 12, CHARACTER_CLASS.ALL, CARD_RARITY.EPIC, minion_type=MINION_TYPE.MECH, buffs=[Buff(ManaChange(Count(CardSelector(EnemyPlayer())), -1))])§§    def create_minion(self, player):§        return Minion(8, 8)§
Card: Clockwork Gnome NAME_END 2 ATK_END 1 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END Common RARITY_END <b>Deathrattle:</b> Add a <b>Spare Part</b> card to your hand.

Python implementation:
class ClockworkGnome(MinionCard):§    def __init__(self):§        super().__init__("Clockwork Gnome", 1, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, minion_type=MINION_TYPE.MECH)§§    def create_minion(self, player):§        from hearthbreaker.cards.spells.neutral import spare_part_list§        return Minion(2, 1, deathrattle=Deathrattle(AddCard(CardQuery(source=CARD_SOURCE.LIST, source_list=spare_part_list)), PlayerSelector()))§
Card: Cobalt Guardian NAME_END 6 ATK_END 3 DEF_END 5 COST_END -1 DUR_END Minion TYPE_END Paladin PLAYER_CLS_END Mech RACE_END Rare RARITY_END Whenever you summon a Mech, gain <b>Divine Shield</b>.

Python implementation:
class CobaltGuardian(MinionCard):§    def __init__(self):§        super().__init__("Cobalt Guardian", 5, CHARACTER_CLASS.PALADIN, CARD_RARITY.RARE, minion_type=MINION_TYPE.MECH)§§    def create_minion(self, player):§        return Minion(6, 3, effects=[Effect(MinionSummoned(IsType(MINION_TYPE.MECH)), ActionTag(Give(DivineShield()), SelfSelector()))])§
Card: Cobra Shot NAME_END -1 ATK_END -1 DEF_END 5 COST_END -1 DUR_END Spell TYPE_END Hunter PLAYER_CLS_END NIL RACE_END Common RARITY_END Deal $3 damage to a minion and the enemy hero.

Python implementation:
class CobraShot(SpellCard):§    def __init__(self):§        super().__init__("Cobra Shot", 5, CHARACTER_CLASS.HUNTER, CARD_RARITY.COMMON, target_func=hearthbreaker.targeting.find_minion_spell_target)§§    def use(self, player, game):§        super().use(player, game)§        self.target.damage(player.effective_spell_damage(3), self)§        game.other_player.hero.damage(player.effective_spell_damage(3), self)§
Card: Coghammer NAME_END 2 ATK_END -1 DEF_END 3 COST_END 3 DUR_END Weapon TYPE_END Paladin PLAYER_CLS_END NIL RACE_END Epic RARITY_END <b>Battlecry:</b> Give a random friendly minion <b>Divine Shield</b> and <b>Taunt</b>.

Python implementation:
class Coghammer(WeaponCard):§    def __init__(self):§        super().__init__("Coghammer", 3, CHARACTER_CLASS.PALADIN, CARD_RARITY.EPIC, battlecry=Battlecry(Give([Buff(DivineShield()), Buff(Taunt())]), MinionSelector(picker=RandomPicker())))§§    def create_weapon(self, player):§        return Weapon(2, 3)§
Card: Cogmaster NAME_END 1 ATK_END 2 DEF_END 1 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END Has +2 Attack while you have a Mech.

Python implementation:
class Cogmaster(MinionCard):§    def __init__(self):§        super().__init__("Cogmaster", 1, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(1, 2, auras=[Aura(ChangeAttack(2), SelfSelector(), GreaterThan(Count(MinionSelector(IsType(MINION_TYPE.MECH))), value=0))])§
Card: Crush NAME_END -1 ATK_END -1 DEF_END 7 COST_END -1 DUR_END Spell TYPE_END Warrior PLAYER_CLS_END NIL RACE_END Epic RARITY_END Destroy a minion. If you have a damaged minion, this costs (4) less.

Python implementation:
class Crush(SpellCard):§    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))])§§    def use(self, player, game):§        super().use(player, game)§§        self.target.die(self)§
Card: Dark Wispers NAME_END -1 ATK_END -1 DEF_END 6 COST_END -1 DUR_END Spell TYPE_END Druid PLAYER_CLS_END NIL RACE_END Epic RARITY_END <b>Choose One -</b> Summon 5 Wisps; or Give a minion +5/+5 and <b>Taunt</b>.

Python implementation:
class DarkWispers(SpellCard):§    def __init__(self):§        super().__init__("Dark Wispers", 6, CHARACTER_CLASS.DRUID, CARD_RARITY.EPIC)§§    def can_use(self, player, game):§        return (super().can_use(player, game) and (len(player.minions) < 7 or hearthbreaker.targeting.find_minion_spell_target(game, lambda t: t.spell_targetable()) is not None))§§    def use(self, player, game):§        super().use(player, game)§§        class Buff5(ChoiceCard):§            def __init__(self):§                super().__init__("Give a minion +5/+5 and Taunt", 0, CHARACTER_CLASS.DRUID, CARD_RARITY.COMMON, False)§§            def can_use(self, player, game):§                return hearthbreaker.targeting.find_minion_spell_target(game, lambda t: t.spell_targetable()) is not None§§            def use(self, player, game):§                targets = hearthbreaker.targeting.find_minion_spell_target(game, lambda t: t.spell_targetable())§                target = player.agent.choose_target(targets)§                target.change_attack(5)§                target.increase_health(5)§                target.taunt = True§§        class Wisps5(ChoiceCard):§            def __init__(self):§                super().__init__("Summon 5 Wisps", 0, CHARACTER_CLASS.DRUID, CARD_RARITY.COMMON, False)§§            def can_use(self, player, game):§                return len(player.minions) < 7§§            def use(self, player, game):§                from hearthbreaker.cards.minions.neutral import Wisp§                for i in range(0, 5):§                    wisp = Wisp()§                    wisp.summon(player, game, len(player.minions))§§        if len(hearthbreaker.targeting.find_minion_spell_target(game, lambda t: t.spell_targetable())) == 0:§            option = Wisps5()§        else:§            option = player.agent.choose_option([Wisps5(), Buff5()], player)§        option.use(player, game)§
Card: Darkbomb NAME_END -1 ATK_END -1 DEF_END 2 COST_END -1 DUR_END Spell TYPE_END Warlock PLAYER_CLS_END NIL RACE_END Common RARITY_END Deal $3 damage.

Python implementation:
class Darkbomb(SpellCard):§    def __init__(self):§        super().__init__("Darkbomb", 2, CHARACTER_CLASS.WARLOCK, CARD_RARITY.COMMON, target_func=hearthbreaker.targeting.find_spell_target)§§    def use(self, player, game):§        super().use(player, game)§        self.target.damage(player.effective_spell_damage(3), self)§
Card: Demonheart NAME_END -1 ATK_END -1 DEF_END 5 COST_END -1 DUR_END Spell TYPE_END Warlock PLAYER_CLS_END NIL RACE_END Epic RARITY_END Deal $5 damage to a minion. If it's a friendly Demon, give it +5/+5 instead.

Python implementation:
class Demonheart(SpellCard):§    def __init__(self):§        super().__init__("Demonheart", 5, CHARACTER_CLASS.WARLOCK, CARD_RARITY.EPIC, target_func=hearthbreaker.targeting.find_minion_spell_target)§§    def use(self, player, game):§        super().use(player, game)§        targets = copy.copy(player.game.current_player.minions)§        if self.target.card.minion_type is MINION_TYPE.DEMON and self.target in targets:§            self.target.change_attack(5)§            self.target.increase_health(5)§        else:§            self.target.damage(player.effective_spell_damage(5), self)§
Card: Dr. Boom NAME_END 7 ATK_END 7 DEF_END 7 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Legendary RARITY_END <b>Battlecry</b>: Summon two 1/1 Boom Bots. <i>WARNING: Bots may explode.</i>

Python implementation:
class DoctorBoom(MinionCard):§    def __init__(self):§        super().__init__("Dr. Boom", 7, CHARACTER_CLASS.ALL, CARD_RARITY.LEGENDARY, battlecry=Battlecry(Summon(BoomBot(), 2), PlayerSelector()))§§    def create_minion(self, player):§        return Minion(7, 7)§
Card: Druid of the Fang NAME_END 7 ATK_END 7 DEF_END 5 COST_END -1 DUR_END Minion TYPE_END Druid PLAYER_CLS_END Beast RACE_END NIL RARITY_END NIL

Python implementation:
class DruidOfTheFang(MinionCard):§    def __init__(self):§        super().__init__("Druid of the Fang", 5, CHARACTER_CLASS.DRUID, CARD_RARITY.COMMON, battlecry=Battlecry(Transform(CobraForm()), SelfSelector(), GreaterThan(Count(MinionSelector(IsType(MINION_TYPE.BEAST))), value=0)))§§    def create_minion(self, player):§        return Minion(4, 4)§
Card: Druid of the Fang NAME_END 4 ATK_END 4 DEF_END 5 COST_END -1 DUR_END Minion TYPE_END Druid PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Battlecry:</b> If you have a Beast, transform this minion into a 7/7.

Python implementation:
class DruidOfTheFang(MinionCard):§    def __init__(self):§        super().__init__("Druid of the Fang", 5, CHARACTER_CLASS.DRUID, CARD_RARITY.COMMON, battlecry=Battlecry(Transform(CobraForm()), SelfSelector(), GreaterThan(Count(MinionSelector(IsType(MINION_TYPE.BEAST))), value=0)))§§    def create_minion(self, player):§        return Minion(4, 4)§
Card: Dunemaul Shaman NAME_END 5 ATK_END 4 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Shaman PLAYER_CLS_END NIL RACE_END Rare RARITY_END <b>Windfury, Overload: (1)</b> NL 50% chance to attack the wrong enemy.

Python implementation:
class DunemaulShaman(MinionCard):§    def __init__(self):§        super().__init__("Dunemaul Shaman", 4, CHARACTER_CLASS.SHAMAN, CARD_RARITY.RARE, overload=1)§§    def create_minion(self, player):§        return Minion(5, 4, windfury=True, effects=[Effect(Attack(), ActionTag(ChangeTarget(CharacterSelector(NotCurrentTarget(), EnemyPlayer(), RandomPicker())), SelfSelector(), And(OneIn(2), OpponentMinionCountIsGreaterThan(0))))])§
Card: Enhance-o Mechano NAME_END 3 ATK_END 2 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END Epic RARITY_END <b>Battlecry:</b> Give your other minions <b>Windfury</b>, <b>Taunt</b>, or <b>Divine Shield</b>. NL <i>(at random)</i>

Python implementation:
class EnhanceoMechano(MinionCard):§    def __init__(self):§        super().__init__("Enhance-o Mechano", 4, CHARACTER_CLASS.ALL, CARD_RARITY.EPIC, minion_type=MINION_TYPE.MECH, battlecry=Battlecry(Give([ Buff(Windfury()), Buff(Taunt()), Buff(DivineShield())], RandomPicker()), MinionSelector()))§§    def create_minion(self, player):§        return Minion(3, 2)§
Card: Explosive Sheep NAME_END 1 ATK_END 1 DEF_END 2 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END Common RARITY_END <b>Deathrattle:</b> Deal 2 damage to all minions.

Python implementation:
class ExplosiveSheep(MinionCard):§    def __init__(self):§        super().__init__("Explosive Sheep", 2, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, minion_type=MINION_TYPE.MECH)§§    def create_minion(self, player):§        return Minion(1, 1, deathrattle=Deathrattle(Damage(2), CharacterSelector(players=BothPlayer())), taunt=True)§
Card: Feign Death NAME_END -1 ATK_END -1 DEF_END 2 COST_END -1 DUR_END Spell TYPE_END Hunter PLAYER_CLS_END NIL RACE_END Epic RARITY_END Trigger all <b>Deathrattles</b> on your minions.

Python implementation:
class FeignDeath(SpellCard):§    def __init__(self):§        super().__init__("Feign Death", 2, CHARACTER_CLASS.HUNTER, CARD_RARITY.EPIC)§§    def use(self, player, game):§        super().use(player, game)§§        for minion in sorted(player.minions, key=lambda m: m.born):§            for deathrattle in minion.deathrattle:§                deathrattle.do(minion)§            if player.double_deathrattle:§                for deathrattle in minion.deathrattle:§                    deathrattle.do(minion)§
Card: Fel Cannon NAME_END 3 ATK_END 5 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Warlock PLAYER_CLS_END Mech RACE_END Rare RARITY_END At the end of your turn, deal 2 damage to a non-Mech minion.

Python implementation:
class FelCannon(MinionCard):§    def __init__(self):§        super().__init__("Fel Cannon", 4, CHARACTER_CLASS.WARLOCK, CARD_RARITY.RARE, minion_type=MINION_TYPE.MECH)§§    def create_minion(self, player):§        return Minion(3, 5, effects=[Effect(TurnEnded(), ActionTag(Damage(2), MinionSelector(Not(IsType(MINION_TYPE.MECH, True)), BothPlayer(), RandomPicker())))])§
Card: Fel Reaver NAME_END 8 ATK_END 8 DEF_END 5 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END Epic RARITY_END Whenever your opponent plays a card, remove the top 3 cards of your deck.

Python implementation:
class FelReaver(MinionCard):§    def __init__(self):§        super().__init__("Fel Reaver", 5, CHARACTER_CLASS.ALL, CARD_RARITY.EPIC, minion_type=MINION_TYPE.MECH)§§    def create_minion(self, player):§        return Minion(8, 8, effects=[Effect(CardPlayed(player=EnemyPlayer()), ActionTag(Discard(3, query=CardQuery(source=CARD_SOURCE.MY_DECK)), PlayerSelector()))])§
Card: Finicky Cloakfield NAME_END -1 ATK_END -1 DEF_END 1 COST_END -1 DUR_END Spell TYPE_END Neutral PLAYER_CLS_END NIL RACE_END NIL RARITY_END Give a friendly minion <b>Stealth</b> until your next turn.

Python implementation:
class FinickyCloakfield(SpellCard):§    def __init__(self):§        super().__init__("Finicky Cloakfield", 1, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, False, target_func=hearthbreaker.targeting.find_friendly_minion_spell_target)§§    def use(self, player, game):§        super().use(player, game)§        self.target.add_buff(BuffUntil(Stealth(), TurnStarted()))§
Card: Flame Leviathan NAME_END 7 ATK_END 7 DEF_END 7 COST_END -1 DUR_END Minion TYPE_END Mage PLAYER_CLS_END Mech RACE_END Legendary RARITY_END When you draw this, deal 2 damage to all characters.

Python implementation:
class FlameLeviathan(MinionCard):§    def __init__(self):§        super().__init__("Flame Leviathan", 7, CHARACTER_CLASS.MAGE, CARD_RARITY.LEGENDARY, minion_type=MINION_TYPE.MECH, effects=[Effect(Drawn(), ActionTag(Damage(2), CharacterSelector(None, BothPlayer())))])§§    def create_minion(self, player):§        return Minion(7, 7)§
Card: Flamecannon NAME_END -1 ATK_END -1 DEF_END 2 COST_END -1 DUR_END Spell TYPE_END Mage PLAYER_CLS_END NIL RACE_END Common RARITY_END Deal $4 damage to a random enemy minion.

Python implementation:
class Flamecannon(SpellCard):§    def __init__(self):§        super().__init__("Flamecannon", 2, CHARACTER_CLASS.MAGE, CARD_RARITY.COMMON)§§    def use(self, player, game):§        super().use(player, game)§§        targets = hearthbreaker.targeting.find_enemy_minion_battlecry_target(player.game, lambda x: True)§        target = game.random_choice(targets)§        target.damage(player.effective_spell_damage(4), self)§§    def can_use(self, player, game):§        return super().can_use(player, game) and len(game.other_player.minions) >= 1§
Card: Foe Reaper 4000 NAME_END 6 ATK_END 9 DEF_END 8 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END Legendary RARITY_END Also damages the minions next to whomever he attacks.

Python implementation:
class FoeReaper4000(MinionCard):§    def __init__(self):§        super().__init__("Foe Reaper 4000", 8, CHARACTER_CLASS.ALL, CARD_RARITY.LEGENDARY, minion_type=MINION_TYPE.MECH)§§    def create_minion(self, player):§        return Minion(6, 9, effects=[Effect(Attack(IsMinion()), ActionTag(Damage(Attribute("attack", SelfSelector())), MinionSelector(TargetAdjacent(), EnemyPlayer())))])§
Card: Force-Tank MAX NAME_END 7 ATK_END 7 DEF_END 8 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END Mech RACE_END Common RARITY_END <b>Divine Shield</b>

Python implementation:
class ForceTankMAX(MinionCard):§    def __init__(self):§        super().__init__("Force-Tank MAX", 8, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, minion_type=MINION_TYPE.MECH)§§    def create_minion(self, player):§        return Minion(7, 7, divine_shield=True)§
Card: Gahz'rilla NAME_END 6 ATK_END 9 DEF_END 7 COST_END -1 DUR_END Minion TYPE_END Hunter PLAYER_CLS_END Beast RACE_END Legendary RARITY_END Whenever this minion takes damage, double its Attack.

Python implementation:
class Gahzrilla(MinionCard):§    def __init__(self):§        super().__init__("Gahz'rilla", 7, CHARACTER_CLASS.HUNTER, CARD_RARITY.LEGENDARY, minion_type=MINION_TYPE.BEAST)§§    def create_minion(self, player):§        return Minion(6, 9, effects=[Effect(Damaged(), ActionTag(Give(Buff(DoubleAttack())), SelfSelector()))])§
Card: Gallywix's Coin NAME_END -1 ATK_END -1 DEF_END 0 COST_END -1 DUR_END Spell TYPE_END Neutral PLAYER_CLS_END NIL RACE_END NIL RARITY_END Gain 1 Mana Crystal this turn only. NL <i>(Won't trigger Gallywix.)</i>

Python implementation:
class GallywixsCoin(SpellCard):§    def __init__(self):§        super().__init__("Gallywix's Coin", 0, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, False)§§    def use(self, player, game):§        super().use(player, game)§        if player.mana < 10:§            player.mana += 1§
Card: Gazlowe NAME_END 3 ATK_END 6 DEF_END 6 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Legendary RARITY_END Whenever you cast a 1-mana spell, add a random Mech to your hand.

Python implementation:
class Gazlowe(MinionCard):§    def __init__(self):§        super().__init__("Gazlowe", 6, CHARACTER_CLASS.ALL, CARD_RARITY.LEGENDARY)§§    def create_minion(self, player):§        return Minion(3, 6, effects=[Effect(SpellCast(ManaCost(1)), ActionTag(AddCard(CardQuery(conditions=[IsType(MINION_TYPE.MECH)])), PlayerSelector()))])§
Card: Gilblin Stalker NAME_END 2 ATK_END 3 DEF_END 2 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Stealth</b>

Python implementation:
class GilblinStalker(MinionCard):§    def __init__(self):§        super().__init__("Gilblin Stalker", 2, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(2, 3, stealth=True)§
Card: Glaivezooka NAME_END 2 ATK_END -1 DEF_END 2 COST_END 2 DUR_END Weapon TYPE_END Hunter PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Battlecry:</b> Give a random friendly minion +1 Attack.

Python implementation:
class Glaivezooka(WeaponCard):§    def __init__(self):§        super().__init__("Glaivezooka", 2, CHARACTER_CLASS.HUNTER, CARD_RARITY.COMMON, battlecry=Battlecry(Give(ChangeAttack(1)), MinionSelector(None, picker=RandomPicker())))§§    def create_weapon(self, player):§        return Weapon(2, 2)§
Card: Gnomeregan Infantry NAME_END 1 ATK_END 4 DEF_END 3 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Common RARITY_END <b>Charge</b> NL <b>Taunt</b>

Python implementation:
class GnomereganInfantry(MinionCard):§    def __init__(self):§        super().__init__("Gnomeregan Infantry", 3, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON)§§    def create_minion(self, player):§        return Minion(1, 4, charge=True, taunt=True)§
Card: Goblin Blastmage NAME_END 5 ATK_END 4 DEF_END 4 COST_END -1 DUR_END Minion TYPE_END Mage PLAYER_CLS_END NIL RACE_END Rare RARITY_END <b>Battlecry:</b> If you have a Mech, deal 4 damage randomly split among all enemies.

Python implementation:
class GoblinBlastmage(MinionCard):§    def __init__(self):§        super().__init__("Goblin Blastmage", 4, CHARACTER_CLASS.MAGE, CARD_RARITY.RARE, battlecry=Battlecry(Damage(1), CharacterSelector(None, EnemyPlayer(), RandomPicker(4)), GreaterThan(Count(MinionSelector(IsType(MINION_TYPE.MECH))), value=0)))§§    def create_minion(self, player):§        return Minion(5, 4)§
Card: Goblin Sapper NAME_END 2 ATK_END 4 DEF_END 3 COST_END -1 DUR_END Minion TYPE_END Neutral PLAYER_CLS_END NIL RACE_END Rare RARITY_END Has +4 Attack while your opponent has 6 or more cards in hand.

Python implementation:
class GoblinSapper(MinionCard):§    def __init__(self):§        super().__init__("Goblin Sapper", 3, CHARACTER_CLASS.ALL, CARD_RARITY.RARE)§§    def create_minion(self, player):§        return Minion(2, 4, buffs=[Buff(ChangeAttack(4), GreaterThan(Count(CardSelector(EnemyPlayer())), value=5))])§