forked from pcyin/NL2code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhs.test_data.ref
More file actions
66 lines (66 loc) · 24.8 KB
/
hs.test_data.ref
File metadata and controls
66 lines (66 loc) · 24.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
class Archmage ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Archmage ` , 6 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON ) def create_minion ( self , player ) : return Minion ( 4 , 7 , spell_damage = 1 )
class Booty Bay Bodyguard ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Booty Bay Bodyguard ` , 5 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON ) def create_minion ( self , player ) : return Minion ( 5 , 4 , taunt = True )
class Darkscale Healer ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Darkscale Healer ` , 5 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON , battlecry = Battlecry ( Heal ( 2 ) , Character Selector ( ) ) ) def create_minion ( self , player ) : return Minion ( 4 , 5 )
class Fiery War Axe ( Weapon Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Fiery War Axe ` , 2 , CHARACTER_CLASS . WARRIOR , CARD_RARITY . FREE ) def create_weapon ( self , player ) : return Weapon ( 3 , 2 )
class Frostwolf Warlord ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Frostwolf Warlord ` , 5 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON , battlecry = Battlecry ( Give ( [ Buff ( Change Attack ( Count ( Minion Selector ( ) ) ) ) , Buff ( Change Health ( Count ( Minion Selector ( ) ) ) ) ] ) , Self Selector ( ) ) ) def create_minion ( self , player ) : return Minion ( 4 , 4 )
class Hellfire ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Hellfire ` , 4 , CHARACTER_CLASS . WARLOCK , CARD_RARITY . FREE ) def use ( self , player , game ) : super ( ) . use ( player , game ) targets = copy . copy ( game . other_player . minions ) targets . extend ( game . current_player . minions ) targets . append ( game . other_player . hero ) targets . append ( game . current_player . hero ) for minion in targets : minion . damage ( player . effective_spell_damage ( 3 ) , self )
class Innervate ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Innervate ` , 0 , CHARACTER_CLASS . DRUID , CARD_RARITY . FREE ) def use ( self , player , game ) : super ( ) . use ( player , game ) if player . mana < 8 : player . mana + = 2 else : player . mana = 10
class Magma Rager ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Magma Rager ` , 3 , CHARACTER_CLASS . ALL , CARD_RARITY . FREE ) def create_minion ( self , player ) : return Minion ( 5 , 1 )
class Mortal Coil ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Mortal Coil ` , 1 , CHARACTER_CLASS . WARLOCK , 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 ( 1 ) and not self . target . divine_shield : self . target . damage ( player . effective_spell_damage ( 1 ) , self ) player . draw ( ) else : self . target . damage ( player . effective_spell_damage ( 1 ) , self )
class Polymorph ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Polymorph ` , 4 , CHARACTER_CLASS . MAGE , CARD_RARITY . FREE , target_func = hearthbreaker . targeting . find_minion_spell_target ) def use ( self , player , game ) : super ( ) . use ( player , game ) from hearthbreaker . cards . minions . mage import Sheep sheep = Sheep ( ) minion = sheep . create_minion ( None ) minion . card = sheep self . target . replace ( minion )
class Searing Totem ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Searing Totem ` , 1 , CHARACTER_CLASS . SHAMAN , CARD_RARITY . FREE , False , MINION_TYPE . TOTEM ) def create_minion ( self , player ) : return Minion ( 1 , 1 )
class Silverback Patriarch ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Silverback Patriarch ` , 3 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON , minion_type = MINION_TYPE . BEAST ) def create_minion ( self , player ) : return Minion ( 1 , 4 , taunt = True )
class Stormwind Knight ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Stormwind Knight ` , 4 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON ) def create_minion ( self , player ) : return Minion ( 2 , 5 , charge = True )
class Voodoo Doctor ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Voodoo Doctor ` , 1 , CHARACTER_CLASS . ALL , CARD_RARITY . FREE , battlecry = Battlecry ( Heal ( 2 ) , Character Selector ( players = Both Player ( ) , picker = User Picker ( ) ) ) ) def create_minion ( self , player ) : return Minion ( 2 , 1 )
class Wrath Of Air Totem ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Wrath of Air Totem ` , 1 , CHARACTER_CLASS . SHAMAN , CARD_RARITY . FREE , False , MINION_TYPE . TOTEM ) def create_minion ( self , player ) : return Minion ( 0 , 2 , spell_damage = 1 )
class Astral Communion ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Astral Communion ` , 4 , CHARACTER_CLASS . DRUID , CARD_RARITY . EPIC ) def use ( self , player , game ) : super ( ) . use ( player , game ) for card in player . hand : card . unattach ( ) player . trigger ( ` card_discarded ` , card ) player . hand = [ ] player . max_mana = 10 player . mana = 10
class Annoyo Tron ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Annoy - o - Tron ` , 2 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON , minion_type = MINION_TYPE . MECH ) def create_minion ( self , player ) : return Minion ( 1 , 2 , divine_shield = True , taunt = True )
class Burly Rockjaw Trogg ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Burly Rockjaw Trogg ` , 4 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON ) def create_minion ( self , player ) : return Minion ( 3 , 5 , effects = [ Effect ( Spell Cast ( player = Enemy Player ( ) ) , Action Tag ( Give ( Change Attack ( 2 ) ) , Self Selector ( ) ) ) ] )
class Cogmasters Wrench ( Weapon Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Cogmaster ` s Wrench ` , 3 , CHARACTER_CLASS . ROGUE , CARD_RARITY . EPIC ) def create_weapon ( self , player ) : return Weapon ( 1 , 3 , buffs = [ Buff ( Change Attack ( 2 ) , Greater Than ( Count ( Minion Selector ( Is Type ( MINION_TYPE . MECH ) ) ) , value = 0 ) ) ] )
class Echo Of Medivh ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Echo of Medivh ` , 4 , CHARACTER_CLASS . MAGE , CARD_RARITY . EPIC ) def use ( self , player , game ) : super ( ) . use ( player , game ) for minion in sorted ( copy . copy ( player . minions ) , key = lambda minion : minion . born ) : if len ( player . hand ) < 10 : player . hand . append ( minion . card )
class Floating Watcher ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Floating Watcher ` , 5 , CHARACTER_CLASS . WARLOCK , CARD_RARITY . COMMON , minion_type = MINION_TYPE . DEMON ) def create_minion ( self , player ) : return Minion ( 4 , 4 , effects = [ Effect ( Character Damaged ( And ( Is Hero ( ) , Owners Turn ( ) ) ) , Action Tag ( Give ( [ Buff ( Change Attack ( 2 ) ) , Buff ( Change Health ( 2 ) ) ] ) , Self Selector ( ) ) ) ] )
class Gnomish Experimenter ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Gnomish Experimenter ` , 3 , CHARACTER_CLASS . ALL , CARD_RARITY . RARE , battlecry = ( Battlecry ( Draw ( ) , Player Selector ( ) ) , Battlecry ( Transform ( Gnomish Chicken ( ) ) , Last Drawn Selector ( ) , Matches ( Last Drawn Selector ( ) , Is Minion ( ) ) ) ) ) def create_minion ( self , player ) : return Minion ( 3 , 2 )
class Iron Juggernaut ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Iron Juggernaut ` , 6 , CHARACTER_CLASS . WARRIOR , CARD_RARITY . LEGENDARY , minion_type = MINION_TYPE . MECH , battlecry = Battlecry ( Add Card ( Burrowing Mine ( ) , add_to_deck = True ) , Player Selector ( Enemy Player ( ) ) ) ) def create_minion ( self , player ) : return Minion ( 6 , 5 )
class Madder Bomber ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Madder Bomber ` , 5 , CHARACTER_CLASS . ALL , CARD_RARITY . RARE , battlecry = Battlecry ( Damage ( 1 ) , Character Selector ( players = Both Player ( ) , picker = Random Picker ( 6 ) ) ) ) def create_minion ( self , player ) : return Minion ( 5 , 4 )
class Mini Mage ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Mini - Mage ` , 4 , CHARACTER_CLASS . ALL , CARD_RARITY . EPIC ) def create_minion ( self , player ) : return Minion ( 4 , 1 , stealth = True , spell_damage = 1 )
class Piloted Sky Golem ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Piloted Sky Golem ` , 6 , CHARACTER_CLASS . ALL , CARD_RARITY . EPIC , minion_type = MINION_TYPE . MECH ) def create_minion ( self , player ) : return Minion ( 6 , 4 , deathrattle = Deathrattle ( Summon ( Card Query ( conditions = [ Mana Cost ( 4 ) , Is Minion ( ) ] ) ) , Player Selector ( ) ) )
class Scarlet Purifier ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Scarlet Purifier ` , 3 , CHARACTER_CLASS . PALADIN , CARD_RARITY . RARE , battlecry = Battlecry ( Damage ( 2 ) , Minion Selector ( Minion Has Deathrattle ( ) , Both Player ( ) ) ) ) def create_minion ( self , player ) : return Minion ( 4 , 3 )
class Siltfin Spiritwalker ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Siltfin Spiritwalker ` , 4 , CHARACTER_CLASS . SHAMAN , CARD_RARITY . EPIC , minion_type = MINION_TYPE . MURLOC , overload = 1 ) def create_minion ( self , player ) : return Minion ( 2 , 5 , effects = [ Effect ( Minion Died ( Is Type ( MINION_TYPE . MURLOC ) ) , Action Tag ( Draw ( ) , Player Selector ( ) ) ) ] )
class Tinkertown Technician ( Minion Card ) : def __init__ ( self ) : from hearthbreaker . cards . spells . neutral import spare_part_list super ( ) . __init__ ( ` Tinkertown Technician ` , 3 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON , battlecry = ( Battlecry ( Give ( [ Buff ( Change Attack ( 1 ) ) , Buff ( Change Health ( 1 ) ) ] ) , Self Selector ( ) , Greater Than ( Count ( Minion Selector ( Is Type ( MINION_TYPE . MECH ) ) ) , value = 0 ) ) , Battlecry ( Add Card ( Card Query ( source = CARD_SOURCE . LIST , source_list = spare_part_list ) ) , Player Selector ( ) , Greater Than ( Count ( Minion Selector ( Is Type ( MINION_TYPE . MECH ) ) ) , value = 0 ) ) ) ) def create_minion ( self , player ) : return Minion ( 3 , 3 )
class Voljin ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Vol ` jin ` , 5 , CHARACTER_CLASS . PRIEST , CARD_RARITY . LEGENDARY , battlecry = Battlecry ( Swap Stats ( ` health ` , ` health ` , True ) , Minion Selector ( players = Both Player ( ) , picker = User Picker ( ) ) ) ) def create_minion ( self , player ) : return Minion ( 6 , 2 )
class Deaths Bite ( Weapon Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Death ` s Bite ` , 4 , CHARACTER_CLASS . WARRIOR , CARD_RARITY . COMMON ) def create_weapon ( self , player ) : return Weapon ( 4 , 2 , deathrattle = Deathrattle ( Damage ( 1 ) , Minion Selector ( players = Both Player ( ) ) ) )
class Maexxna ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Maexxna ` , 6 , CHARACTER_CLASS . ALL , CARD_RARITY . LEGENDARY , minion_type = MINION_TYPE . BEAST ) def create_minion ( self , player ) : return Minion ( 2 , 8 , effects = [ Effect ( Did Damage ( ) , Action Tag ( Kill ( ) , Target Selector ( Is Minion ( ) ) ) ) ] )
class Sludge Belcher ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Sludge Belcher ` , 5 , CHARACTER_CLASS . ALL , CARD_RARITY . RARE ) def create_minion ( self , player ) : return Minion ( 3 , 5 , taunt = True , deathrattle = Deathrattle ( Summon ( Slime ( ) ) , Player Selector ( ) ) )
class Voidcaller ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Voidcaller ` , 4 , CHARACTER_CLASS . WARLOCK , CARD_RARITY . COMMON , minion_type = MINION_TYPE . DEMON ) def create_minion ( self , player ) : return Minion ( 3 , 4 , deathrattle = Deathrattle ( Summon ( Card Query ( conditions = [ Is Type ( MINION_TYPE . DEMON ) ] , source = CARD_SOURCE . MY_HAND ) ) , Player Selector ( ) ) )
class Alexstrasza ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Alexstrasza ` , 9 , CHARACTER_CLASS . ALL , CARD_RARITY . LEGENDARY , minion_type = MINION_TYPE . DRAGON , battlecry = Battlecry ( Set Health ( 15 ) , Hero Selector ( players = Both Player ( ) , picker = User Picker ( ) ) ) ) def create_minion ( self , player ) : return Minion ( 8 , 8 )
class Arcane Golem ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Arcane Golem ` , 3 , CHARACTER_CLASS . ALL , CARD_RARITY . RARE , battlecry = Battlecry ( Give Mana Crystal ( ) , Player Selector ( players = Enemy Player ( ) ) ) ) def create_minion ( self , player ) : return Minion ( 4 , 2 , charge = True )
class Baine Bloodhoof ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Baine Bloodhoof ` , 4 , CHARACTER_CLASS . ALL , CARD_RARITY . LEGENDARY , False ) def create_minion ( self , player ) : return Minion ( 4 , 5 )
class Blade Flurry ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Blade Flurry ` , 2 , CHARACTER_CLASS . ROGUE , CARD_RARITY . RARE ) def use ( self , player , game ) : super ( ) . use ( player , game ) if player . weapon is not None : attack_power = player . effective_spell_damage ( player . hero . calculate_attack ( ) ) player . weapon . destroy ( ) for minion in copy . copy ( game . other_player . minions ) : minion . damage ( attack_power , self ) game . other_player . hero . damage ( attack_power , self )
class Brawl ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Brawl ` , 5 , 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 ) > = 2 def use ( self , player , game ) : super ( ) . use ( player , game ) minions = copy . copy ( player . minions ) minions . extend ( game . other_player . minions ) if len ( minions ) > 1 : survivor = game . random_choice ( minions ) for minion in minions : if minion is not survivor : minion . die ( self )
class Conceal ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Conceal ` , 1 , CHARACTER_CLASS . ROGUE , CARD_RARITY . COMMON ) def use ( self , player , game ) : super ( ) . use ( player , game ) for minion in player . minions : if not minion . stealth : minion . add_buff ( Buff Until ( Stealth ( ) , Turn Started ( ) ) )
class Defender Minion ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Defender ` , 1 , CHARACTER_CLASS . PALADIN , CARD_RARITY . COMMON ) def create_minion ( self , p ) : return Minion ( 2 , 1 )
class Doomguard ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Doomguard ` , 5 , CHARACTER_CLASS . WARLOCK , CARD_RARITY . RARE , minion_type = MINION_TYPE . DEMON , battlecry = Battlecry ( Discard ( amount = 2 ) , Player Selector ( ) ) ) def create_minion ( self , player ) : return Minion ( 5 , 7 , charge = True )
class Earth Elemental ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Earth Elemental ` , 5 , CHARACTER_CLASS . SHAMAN , CARD_RARITY . EPIC , overload = 3 ) def create_minion ( self , player ) : return Minion ( 7 , 8 , taunt = True )
class Explosive Trap ( Secret Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Explosive Trap ` , 2 , CHARACTER_CLASS . HUNTER , CARD_RARITY . COMMON ) 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 , attacker , target ) : if isinstance ( target , Hero ) : game = attacker . player . game enemies = copy . copy ( game . current_player . minions ) enemies . append ( game . current_player . hero ) for enemy in enemies : enemy . damage ( 2 , None ) game . check_delayed ( ) super ( ) . reveal ( )
class Flame Of Azzinoth ( Minion Card ) : 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 )
class Gnoll ( Minion Card ) : 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 )
class Holy Wrath ( Spell Card ) : 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 )
class Infernal ( Minion Card ) : 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 )
class Kirin Tor Mage ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Kirin Tor Mage ` , 3 , CHARACTER_CLASS . MAGE , CARD_RARITY . RARE , battlecry = Battlecry ( Give Aura ( [ Aura Until ( Mana Change ( - 100 ) , Card Selector ( condition = Is Secret ( ) ) , Card Played ( Is Secret ( ) ) ) ] ) , Player Selector ( ) ) ) def create_minion ( self , player ) : return Minion ( 4 , 3 )
class Lightwarden ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Lightwarden ` , 1 , CHARACTER_CLASS . ALL , CARD_RARITY . RARE ) def create_minion ( self , player ) : return Minion ( 1 , 2 , effects = [ Effect ( Character Healed ( player = Both Player ( ) ) , Action Tag ( Give ( Change Attack ( 2 ) ) , Self Selector ( ) ) ) ] )
class Mana Wraith ( Minion Card ) : 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 ( Mana Change ( 1 ) , Card Selector ( Both Player ( ) , Is Minion ( ) ) ) ] )
class Misdirection ( Secret Card ) : 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 ( )
class Noble Sacrifice ( Secret Card ) : 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 Defender Minion defender = Defender Minion ( ) 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 )
class Power Of The Wild ( Spell Card ) : 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 ( [ Leader Of The Pack ( ) , Summon Panther ( ) ] , player ) option . use ( player , game )
class Redemption ( Secret Card ) : 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 )
class Shadow Madness ( Spell Card ) : 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 ( Buff Until ( Stolen ( ) , Turn Ended ( ) ) ) def can_use ( self , player , game ) : return super ( ) . can_use ( player , game ) and len ( player . minions ) < 7
class Siphon Soul ( Spell Card ) : 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 )
class Spellbender ( Secret Card ) : 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 ( ) : Spellbender Minion ( ) . 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
class Summoning Portal ( Minion Card ) : 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 ( Mana Change ( - 2 , 1 , minimum = 1 ) , Card Selector ( condition = Is Minion ( ) ) ) ] )
class Thrallmar Farseer ( Minion Card ) : 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 )
class Upgrade ( Spell Card ) : 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 Heavy Axe if player . weapon : player . weapon . durability + = 1 player . weapon . base_attack + = 1 else : heavy_axe = Heavy Axe ( ) . create_weapon ( player ) heavy_axe . equip ( player )
class Wisp ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Wisp ` , 0 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON ) def create_minion ( self , player ) : return Minion ( 1 , 1 )
class Black Whelp ( Minion Card ) : 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 )
class Dragonkin Sorcerer ( Minion Card ) : 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 ( Spell Targeted ( ) , [ Action Tag ( Give ( [ Buff ( Change Attack ( 1 ) ) , Buff ( Change Health ( 1 ) ) ] ) , Self Selector ( ) ) ] ) ] )
class Hungry Dragon ( Minion Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Hungry Dragon ` , 4 , CHARACTER_CLASS . ALL , CARD_RARITY . COMMON , minion_type = MINION_TYPE . DRAGON , battlecry = ( Battlecry ( Summon ( Card Query ( conditions = [ Mana Cost ( 1 ) , Is Minion ( ) ] ) ) , Player Selector ( Enemy Player ( ) ) ) ) ) def create_minion ( self , player ) : return Minion ( 5 , 6 )
class Solemn Vigil ( Spell Card ) : def __init__ ( self ) : super ( ) . __init__ ( ` Solemn Vigil ` , 5 , CHARACTER_CLASS . PALADIN , CARD_RARITY . COMMON , buffs = [ Buff ( Mana Change ( Count ( Dead Minion Selector ( players = Both Player ( ) ) ) , - 1 ) ) ] ) def use ( self , player , game ) : super ( ) . use ( player , game ) for n in range ( 0 , 2 ) : player . draw ( )