From 18ec6bbb75df88e8494a27b405056a1434ef3580 Mon Sep 17 00:00:00 2001 From: shinoi2 Date: Mon, 18 Mar 2024 10:45:49 +0800 Subject: [PATCH] add requirements --- fireplace/cards/boomsday/druid.py | 7 +++ fireplace/cards/boomsday/hunter.py | 17 +++++++ fireplace/cards/boomsday/mage.py | 7 +++ fireplace/cards/boomsday/neutral_common.py | 9 ++++ fireplace/cards/boomsday/neutral_epic.py | 5 ++ fireplace/cards/boomsday/paladin.py | 8 ++++ fireplace/cards/boomsday/priest.py | 18 +++++++ fireplace/cards/boomsday/rogue.py | 19 ++++++++ fireplace/cards/boomsday/shaman.py | 6 +++ fireplace/cards/boomsday/warlock.py | 7 +++ fireplace/cards/boomsday/warrior.py | 17 +++++++ fireplace/cards/classic/mage.py | 4 ++ fireplace/cards/classic/priest.py | 3 ++ fireplace/cards/classic/rogue.py | 5 ++ fireplace/cards/classic/warlock.py | 4 ++ fireplace/cards/dalaran/druid.py | 26 ++++++++++ fireplace/cards/dalaran/hunter.py | 19 ++++++++ fireplace/cards/dalaran/lackey.py | 13 +++++ fireplace/cards/dalaran/mage.py | 19 ++++++++ fireplace/cards/dalaran/neutral_common.py | 14 ++++++ fireplace/cards/dalaran/neutral_rare.py | 3 ++ fireplace/cards/dalaran/paladin.py | 19 ++++++++ fireplace/cards/dalaran/priest.py | 29 +++++++++++- fireplace/cards/dalaran/rogue.py | 36 ++++++++++++-- fireplace/cards/dalaran/shaman.py | 8 ++++ fireplace/cards/dalaran/warlock.py | 16 ++++++- fireplace/cards/dalaran/warrior.py | 12 +++++ fireplace/cards/gangs/druid.py | 9 ++++ fireplace/cards/gangs/kazakus_potions.py | 12 +++++ fireplace/cards/icecrown/druid.py | 10 ++++ fireplace/cards/icecrown/hunter.py | 13 +++++ fireplace/cards/icecrown/mage.py | 10 ++++ fireplace/cards/icecrown/neutral_common.py | 25 ++++++++++ fireplace/cards/icecrown/neutral_legendary.py | 11 +++++ fireplace/cards/icecrown/neutral_rare.py | 5 ++ fireplace/cards/icecrown/paladin.py | 11 +++++ fireplace/cards/icecrown/priest.py | 15 ++++++ fireplace/cards/icecrown/rogue.py | 20 ++++++++ fireplace/cards/icecrown/shaman.py | 17 +++++++ fireplace/cards/icecrown/warlock.py | 18 +++++++ fireplace/cards/karazhan/collectible.py | 4 ++ fireplace/cards/kobolds/druid.py | 16 +++++++ fireplace/cards/kobolds/hunter.py | 14 ++++++ fireplace/cards/kobolds/mage.py | 4 ++ fireplace/cards/kobolds/neutral_common.py | 10 ++++ fireplace/cards/kobolds/neutral_epic.py | 5 ++ fireplace/cards/kobolds/neutral_legendary.py | 11 +++++ fireplace/cards/kobolds/neutral_rare.py | 10 ++++ fireplace/cards/kobolds/paladin.py | 13 +++++ fireplace/cards/kobolds/priest.py | 35 ++++++++++++++ fireplace/cards/kobolds/rogue.py | 13 +++++ fireplace/cards/kobolds/shaman.py | 29 ++++++++++++ fireplace/cards/kobolds/warlock.py | 32 +++++++++++++ fireplace/cards/kobolds/warrior.py | 3 ++ fireplace/cards/troll/druid.py | 22 +++++++++ fireplace/cards/troll/hunter.py | 16 +++++++ fireplace/cards/troll/mage.py | 4 ++ fireplace/cards/troll/neutral_common.py | 7 +++ fireplace/cards/troll/neutral_epic.py | 5 ++ fireplace/cards/troll/neutral_rare.py | 9 ++++ fireplace/cards/troll/paladin.py | 10 ++++ fireplace/cards/troll/priest.py | 12 +++++ fireplace/cards/troll/rogue.py | 8 ++++ fireplace/cards/troll/shaman.py | 19 ++++++++ fireplace/cards/troll/warlock.py | 9 ++++ fireplace/cards/troll/warrior.py | 15 ++++++ fireplace/cards/ungoro/adapt_buff.py | 40 ++++++++++++++++ fireplace/cards/ungoro/druid.py | 5 ++ fireplace/cards/ungoro/hunter.py | 4 ++ fireplace/cards/ungoro/neutral_epic.py | 9 ++++ fireplace/cards/ungoro/rogue.py | 13 +++++ fireplace/cards/ungoro/shaman.py | 11 +++++ fireplace/cards/ungoro/warlock.py | 12 +++++ fireplace/cards/witchwood/druid.py | 12 +++++ fireplace/cards/witchwood/hunter.py | 9 ++++ fireplace/cards/witchwood/mage.py | 4 ++ fireplace/cards/witchwood/neutral_epic.py | 9 ++++ fireplace/cards/witchwood/neutral_rare.py | 4 ++ fireplace/cards/witchwood/paladin.py | 4 ++ fireplace/cards/witchwood/priest.py | 17 +++++++ fireplace/cards/witchwood/rogue.py | 8 ++++ fireplace/cards/witchwood/shaman.py | 11 +++++ fireplace/cards/witchwood/warlock.py | 9 ++++ fireplace/cards/witchwood/warrior.py | 3 ++ fireplace/cards/wog/rogue.py | 4 ++ tests/generator.py | 5 ++ tests/requirements_generator.py | 47 +++++++++++++++++++ 87 files changed, 1093 insertions(+), 8 deletions(-) create mode 100644 tests/requirements_generator.py diff --git a/fireplace/cards/boomsday/druid.py b/fireplace/cards/boomsday/druid.py index 3539d1f2c..147b9a4f2 100644 --- a/fireplace/cards/boomsday/druid.py +++ b/fireplace/cards/boomsday/druid.py @@ -60,6 +60,10 @@ class Hand: class BOT_507: """Gloop Sprayer""" # Battlecry: Summon a copy of each adjacent minion. + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Summon(CONTROLLER, ExactCopy(SELF_ADJACENT)) @@ -92,6 +96,9 @@ class BOT_404: class BOT_420: """Landscaping""" # Summon two 2/2 Treants. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "EX1_158t") * 2 diff --git a/fireplace/cards/boomsday/hunter.py b/fireplace/cards/boomsday/hunter.py index 61494c66e..fad5576b0 100644 --- a/fireplace/cards/boomsday/hunter.py +++ b/fireplace/cards/boomsday/hunter.py @@ -23,6 +23,12 @@ class BOT_038: """Fireworks Tech""" # [x]Battlecry: Give a friendly Mech +1/+1. If it has Deathrattle, # trigger it. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_WITH_RACE: 17, + } play = ( Buff(TARGET, "BOT_038e"), Find(TARGET + DEATHRATTLE) & Deathrattle(TARGET) @@ -56,6 +62,9 @@ class BOT_251e: class BOT_033: """Bomb Toss""" # Deal $2 damage. Summon a 0/2 Goblin_Bomb. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 2), Summon(CONTROLLER, "BOT_031") @@ -72,6 +81,9 @@ class BOT_402: class BOT_429: """Flark's Boom-Zooka""" # [x]Summon 3 minions from your deck. They attack enemy minions, then die. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, RANDOM(FRIENDLY_DECK + MINION)).then( Attack(Summon.CARD, RANDOM_ENEMY_MINION), Destroy(Summon.CARD) @@ -81,6 +93,11 @@ class BOT_429: class BOT_437: """Goblin Prank""" # Give a friendly minion +3/+3 and Rush. It_dies at end of turn. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Buff(TARGET, "BOT_437e") diff --git a/fireplace/cards/boomsday/mage.py b/fireplace/cards/boomsday/mage.py index 3ec0096bd..e98c47d19 100644 --- a/fireplace/cards/boomsday/mage.py +++ b/fireplace/cards/boomsday/mage.py @@ -45,6 +45,9 @@ class BOT_101: class BOT_254: """Unexpected Results""" # [x]Summon two random $2-Cost minions (improved by Spell Damage). + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, RandomMinion(cost=SPELL_DAMAGE(2))) @@ -62,6 +65,10 @@ class BOT_257e: class BOT_453: """Shooting Star""" # Deal $1 damage to a minion and the minions next to it. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 1), Hit(TARGET_ADJACENT, 1) diff --git a/fireplace/cards/boomsday/neutral_common.py b/fireplace/cards/boomsday/neutral_common.py index b77fdf691..67a000b72 100644 --- a/fireplace/cards/boomsday/neutral_common.py +++ b/fireplace/cards/boomsday/neutral_common.py @@ -31,6 +31,12 @@ class BOT_031: class BOT_079: """Faithful Lumi""" # Battlecry: Give a friendly Mech +1/+1. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_TARGET_WITH_RACE: 17, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "BOT_079e") @@ -55,6 +61,9 @@ class BOT_267: class BOT_308: """Spring Rocket""" # Battlecry: Deal 2 damage. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = Hit(TARGET, 2) diff --git a/fireplace/cards/boomsday/neutral_epic.py b/fireplace/cards/boomsday/neutral_epic.py index 72bc651d3..faddefc11 100644 --- a/fireplace/cards/boomsday/neutral_epic.py +++ b/fireplace/cards/boomsday/neutral_epic.py @@ -53,6 +53,11 @@ class BOT_511t: class BOT_540: """E.M.P. Operative""" # Battlecry: Destroy a Mech. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_TARGET_WITH_RACE: 17, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET) diff --git a/fireplace/cards/boomsday/paladin.py b/fireplace/cards/boomsday/paladin.py index c06a1c6a9..e115ddc09 100644 --- a/fireplace/cards/boomsday/paladin.py +++ b/fireplace/cards/boomsday/paladin.py @@ -61,6 +61,10 @@ class BOT_234e: class BOT_436: """Prismatic Lens""" # Draw a minion and a spell from your deck. Swap their Costs. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = FindAll( FRIENDLY_DECK + MINION, FRIENDLY_DECK + SPELL @@ -96,4 +100,8 @@ class BOT_909: class BOT_912: """Kangor's Endless Army""" # Resurrect 3 friendly Mechs. They keep any Magnetic upgrades. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + PlayReq.REQ_FRIENDLY_MINIONS_OF_RACE_DIED_THIS_GAME: 17, + } play = Summon(CONTROLLER, KeepMagneticCopy(RANDOM(FRIENDLY + KILLED + MECH) * 3)) diff --git a/fireplace/cards/boomsday/priest.py b/fireplace/cards/boomsday/priest.py index d604f6fbe..8c354dd15 100644 --- a/fireplace/cards/boomsday/priest.py +++ b/fireplace/cards/boomsday/priest.py @@ -63,10 +63,18 @@ class BOT_566e: class BOT_219: """Extra Arms""" # [x]Give a minion +2/+2. Add 'More Arms!' to your hand that gives +2/+2. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "BOT_219e"), Give(CONTROLLER, "BOT_219t") class BOT_219t: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "BOT_219te") @@ -85,6 +93,10 @@ class BOT_435: class BOT_517: """Topsy Turvy""" # Swap a minion's Attack and Health. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "BOT_517e") @@ -94,6 +106,12 @@ class BOT_517: class BOT_529: """Power Word: Replicate""" # Choose a friendly minion. Summon a 5/5 copy of it. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, Buff(ExactCopy(TARGET), "BOT_529e")) diff --git a/fireplace/cards/boomsday/rogue.py b/fireplace/cards/boomsday/rogue.py index 9b10853fd..1502d23e3 100644 --- a/fireplace/cards/boomsday/rogue.py +++ b/fireplace/cards/boomsday/rogue.py @@ -27,6 +27,11 @@ class BOT_283: class BOT_288: """Lab Recruiter""" # Battlecry: Shuffle 3 copies of a friendly minion into your deck. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Shuffle(CONTROLLER, Copy(TARGET)) * 3 @@ -39,6 +44,11 @@ class BOT_565: class BOT_576: """Crazed Chemist""" # Combo: Give a friendly minion +4 Attack. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_FOR_COMBO: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } combo = Buff(TARGET, "BOT_576e") @@ -57,6 +67,9 @@ class BOT_084: class BOT_087: """Academic Espionage""" # Shuffle 10 cards from your opponent's class into your deck. They_cost (1). + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Shuffle(CONTROLLER, Buff( RandomCollectible(card_class=ENEMY_CLASS), "BOT_087e")) * 10 @@ -75,6 +88,12 @@ class BOT_242: class BOT_508: """Necrium Vial""" # Trigger a friendly minion's Deathrattle twice. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_TARGET_WITH_DEATHRATTLE: 0, + } play = Deathrattle(TARGET) * 2 diff --git a/fireplace/cards/boomsday/shaman.py b/fireplace/cards/boomsday/shaman.py index ead626bc4..2d1046524 100644 --- a/fireplace/cards/boomsday/shaman.py +++ b/fireplace/cards/boomsday/shaman.py @@ -63,6 +63,9 @@ class BOT_093: class BOT_099: """Eureka!""" # Summon a copy of_a_random minion from your hand. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, ExactCopy(RANDOM(FRIENDLY_HAND + MINION))) @@ -81,4 +84,7 @@ class BOT_246: class BOT_451: """Voltaic Burst""" # Summon two 1/1 Sparks with Rush. Overload: (1) + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "BOT_102t") * 2 diff --git a/fireplace/cards/boomsday/warlock.py b/fireplace/cards/boomsday/warlock.py index 7090eac7d..a32e74705 100644 --- a/fireplace/cards/boomsday/warlock.py +++ b/fireplace/cards/boomsday/warlock.py @@ -47,6 +47,10 @@ class BOT_536: class BOT_222: """Spirit Bomb""" # Deal $4 damage to a minion and your hero. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 4), Hit(FRIENDLY_HERO, 4) @@ -62,6 +66,9 @@ class BOT_263: class BOT_521: """Ectomancy""" # Summon copies of all Demons you control. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, ExactCopy(FRIENDLY_MINIONS + DEMON)) diff --git a/fireplace/cards/boomsday/warrior.py b/fireplace/cards/boomsday/warrior.py index 1758e693f..b4dc12faf 100644 --- a/fireplace/cards/boomsday/warrior.py +++ b/fireplace/cards/boomsday/warrior.py @@ -46,6 +46,11 @@ class BOT_042: class BOT_067: """Rocket Boots""" # Give a minion Rush. Draw a card. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Buff(TARGET, "BOT_067e"), Draw(CONTROLLER) @@ -55,6 +60,9 @@ class BOT_067: class BOT_069: """The Boomship""" # Summon 3 random minions from your hand. Give them Rush. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, RANDOM(FRIENDLY_HAND + MINION) * 3).then( Buff(Summon.CARD, "BOT_069e") ) @@ -111,6 +119,9 @@ class BOT_238p: class BOT_238p1: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } entourage = BOT_238.entourage activate = Hit(TARGET, 3) events = OWN_TURN_END.on(Summon(CONTROLLER, RandomEntourage(exclude=SELF))) @@ -129,12 +140,18 @@ class BOT_238p3: class BOT_238p4: + requirements = { + PlayReq.REQ_HAND_NOT_FULL: 0, + } entourage = BOT_238.entourage activate = DISCOVER(RandomMech()) events = OWN_TURN_END.on(Summon(CONTROLLER, RandomEntourage(exclude=SELF))) class BOT_238p6: + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } entourage = BOT_238.entourage activate = Summon(CONTROLLER, "BOT_312t") * 3 events = OWN_TURN_END.on(Summon(CONTROLLER, RandomEntourage(exclude=SELF))) diff --git a/fireplace/cards/classic/mage.py b/fireplace/cards/classic/mage.py index 0aae943ae..ec6c8a4ea 100644 --- a/fireplace/cards/classic/mage.py +++ b/fireplace/cards/classic/mage.py @@ -201,6 +201,10 @@ class EX1_594: class EX1_179: """Icicle""" # Deal $2 damage to a minion. If it's Frozen, draw a card. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 2), Find(TARGET + FROZEN) & Draw(CONTROLLER) diff --git a/fireplace/cards/classic/priest.py b/fireplace/cards/classic/priest.py index 5da2700fb..5c3eccc69 100644 --- a/fireplace/cards/classic/priest.py +++ b/fireplace/cards/classic/priest.py @@ -118,6 +118,9 @@ def apply(self, target): class CS1_130: """Holy Smite""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 2) diff --git a/fireplace/cards/classic/rogue.py b/fireplace/cards/classic/rogue.py index 6422de266..686540c82 100644 --- a/fireplace/cards/classic/rogue.py +++ b/fireplace/cards/classic/rogue.py @@ -226,4 +226,9 @@ class EX1_182: class EX1_191: """Plaguebringer""" # Battlecry: Give a friendly minion Poisonous. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = GivePoisonous(TARGET) diff --git a/fireplace/cards/classic/warlock.py b/fireplace/cards/classic/warlock.py index 1c7b7b18c..0205a2dd2 100644 --- a/fireplace/cards/classic/warlock.py +++ b/fireplace/cards/classic/warlock.py @@ -197,6 +197,10 @@ class EX1_596: class NEW1_003: """Sacrificial Pact""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_TARGET_WITH_RACE: 15, + } play = Destroy(TARGET), Heal(FRIENDLY_HERO, 5) diff --git a/fireplace/cards/dalaran/druid.py b/fireplace/cards/dalaran/druid.py index 2391396bb..1ef553a5f 100644 --- a/fireplace/cards/dalaran/druid.py +++ b/fireplace/cards/dalaran/druid.py @@ -55,35 +55,57 @@ class DAL_799: class DAL_256: """The Forest's Aid""" # Twinspell Summon five 2/2 Treants. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Give(CONTROLLER, "DAL_256ts"), Summon(CONTROLLER, "DAL_256t2") * 5 class DAL_256ts: + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "DAL_256t2") * 5 class DAL_350: """Crystal Power""" # Choose One - Deal $2 damage to a minion; or_Restore #5 Health. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } choose = ("DAL_350a", "DAL_350b") play = ChooseBoth(CONTROLLER) & (Hit(TARGET, 2), Heal(TARGET, 5)) class DAL_350a: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 2) class DAL_350b: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Heal(TARGET, 5) class DAL_351: """Blessing of the Ancients""" # Twinspell Give your minions +1/+1. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Give(CONTROLLER, "DAL_351ts"), Buff(FRIENDLY_MINIONS, "DAL_351e") class DAL_351ts: + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(FRIENDLY_MINIONS, "DAL_351e") @@ -104,4 +126,8 @@ class DAL_352: class DAL_733: """Dreamway Guardians""" # Summon two 1/2 Dryads with Lifesteal. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "DAL_733t") * 2 diff --git a/fireplace/cards/dalaran/hunter.py b/fireplace/cards/dalaran/hunter.py index 302625dd0..cd78b80aa 100644 --- a/fireplace/cards/dalaran/hunter.py +++ b/fireplace/cards/dalaran/hunter.py @@ -52,16 +52,26 @@ class DAL_604: class DAL_371: """Marked Shot""" # Deal $4 damage to_a_minion. Discover_a_spell. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 4), DISCOVER(RandomSpell()) class DAL_373: """Rapid Fire""" # Twinspell Deal $1 damage. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Give(CONTROLLER, "DAL_373ts"), Hit(TARGET, 1) class DAL_373ts: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 1) @@ -69,6 +79,9 @@ class DAL_377: """Nine Lives""" # Discover a friendly Deathrattle minion that died this game. Also # trigger its Deathrattle. + requirements = { + PlayReq.REQ_FRIENDLY_DEATHRATTLE_MINION_DIED_THIS_GAME: 0, + } play = GenericChoice( CONTROLLER, Copy(RANDOM(DeDuplicate(FRIENDLY + KILLED + DEATHRATTLE + MINION)) * 3) ).then( @@ -80,10 +93,16 @@ class DAL_377: class DAL_378: """Unleash the Beast""" # Twinspell Summon a 5/5 Wyvern with Rush. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Give(CONTROLLER, "DAL_378ts"), Summon(CONTROLLER, "DAL_378t1") class DAL_378ts: + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "DAL_378t1") diff --git a/fireplace/cards/dalaran/lackey.py b/fireplace/cards/dalaran/lackey.py index c39d20743..061225101 100644 --- a/fireplace/cards/dalaran/lackey.py +++ b/fireplace/cards/dalaran/lackey.py @@ -13,18 +13,31 @@ class DAL_613: class DAL_614: """Kobold Lackey""" # Battlecry: Deal 2 damage. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 2) class DAL_615: """Witchy Lackey""" # Battlecry: Transform a friendly minion into one that costs (1) more. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Evolve(TARGET, 1) class DAL_739: """Goblin Lackey""" # Battlecry: Give a friendly minion +1 Attack and_Rush. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Buff(TARGET, "DAL_739e") diff --git a/fireplace/cards/dalaran/mage.py b/fireplace/cards/dalaran/mage.py index 257422140..538e9ffc1 100644 --- a/fireplace/cards/dalaran/mage.py +++ b/fireplace/cards/dalaran/mage.py @@ -59,6 +59,10 @@ class DAL_609e: class DAL_177: """Conjurer's Calling""" # Twinspell Destroy a minion. Summon 2 minions of the same Cost to replace it. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = ( Give(CONTROLLER, "DAL_177ts"), Destroy(TARGET), Summon(CONTROLLER, RandomMinion(cost=COST(TARGET))) * 2 @@ -66,6 +70,10 @@ class DAL_177: class DAL_177ts: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET), Summon(CONTROLLER, RandomMinion(cost=COST(TARGET))) * 2 @@ -73,6 +81,10 @@ class DAL_577: """Ray of Frost""" # Twinspell Freeze a minion. If it's already Frozen, deal $2 # damage to it. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = ( Give(CONTROLLER, "DAL_577ts"), Find(TARGET + FROZEN) & Hit(TARGET, 2) | Freeze(TARGET) @@ -80,12 +92,19 @@ class DAL_577: class DAL_577ts: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Find(TARGET + FROZEN) & Hit(TARGET, 2) | Freeze(TARGET) class DAL_578: """Power of Creation""" # Discover a 6-Cost minion. Summon two copies of it. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Discover(CONTROLLER, RandomMinion(cost=6)).then( Summon(CONTROLLER, Copy(Discover.CARD)) * 2 ) diff --git a/fireplace/cards/dalaran/neutral_common.py b/fireplace/cards/dalaran/neutral_common.py index 2727bb903..a79c85868 100644 --- a/fireplace/cards/dalaran/neutral_common.py +++ b/fireplace/cards/dalaran/neutral_common.py @@ -7,12 +7,21 @@ class DAL_077: """Toxfin""" # Battlecry: Give a friendly Murloc Poisonous. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_TARGET_WITH_RACE: 14, + } play = GivePoisonous(TARGET) class DAL_078: """Traveling Healer""" # [x]Divine Shield Battlecry: Restore #3 Health. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = Heal(TARGET, 3) @@ -96,6 +105,11 @@ class DAL_743: class DAL_744: """Faceless Rager""" # Battlecry: Copy a friendly minion's Health. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = CopyStateBuff(TARGET, "DAL_744e") diff --git a/fireplace/cards/dalaran/neutral_rare.py b/fireplace/cards/dalaran/neutral_rare.py index 137b9284b..317779b72 100644 --- a/fireplace/cards/dalaran/neutral_rare.py +++ b/fireplace/cards/dalaran/neutral_rare.py @@ -34,6 +34,9 @@ class DAL_434: class DAL_539: """Sunreaver Warmage""" # Battlecry: If you're holding a spell that costs (5) or more, deal 4 damage. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_COST_5_OR_MORE_SPELL_IN_HAND: 0, + } powered_up = Find(FRIENDLY_HAND + SPELL + (COST >= 5)) play = powered_up & Hit(TARGET, 4) diff --git a/fireplace/cards/dalaran/paladin.py b/fireplace/cards/dalaran/paladin.py index 7e0b74c59..1e446a2eb 100644 --- a/fireplace/cards/dalaran/paladin.py +++ b/fireplace/cards/dalaran/paladin.py @@ -37,6 +37,9 @@ class DAL_581: class DAL_141: """Desperate Measures""" # Twinspell Cast a random Paladin Secret. + requirements = { + PlayReq.REQ_SECRET_ZONE_CAP_FOR_NON_SECRET: 0, + } play = ( Give(CONTROLLER, "DAL_141ts"), CastSpell(RandomSpell(secret=True, card_class=CardClass.PALADIN)) @@ -44,12 +47,20 @@ class DAL_141: class DAL_141ts: + requirements = { + PlayReq.REQ_SECRET_ZONE_CAP_FOR_NON_SECRET: 0, + } play = CastSpell(RandomSpell(secret=True, card_class=CardClass.PALADIN)) class DAL_568: """Lightforged Blessing""" # Twinspell Give a friendly minion Lifesteal. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = ( Give(CONTROLLER, "DAL_568ts"), GiveLifesteal(TARGET) @@ -57,6 +68,11 @@ class DAL_568: class DAL_568ts: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = GiveLifesteal(TARGET) @@ -87,6 +103,9 @@ class DAL_731: """Duel!""" # Summon a minion from each player's deck. They fight! # TODO need test + requirements = { + PlayReq.REQ_BOARD_NOT_COMPLETELY_FULL: 0, + } play = Attack( Summon(CONTROLLER, RANDOM(FRIENDLY_DECK + MINION)), Summon(OPPONENT, RANDOM(ENEMY_DECK + MINION)), diff --git a/fireplace/cards/dalaran/priest.py b/fireplace/cards/dalaran/priest.py index 5db01586f..3d96a6c2c 100644 --- a/fireplace/cards/dalaran/priest.py +++ b/fireplace/cards/dalaran/priest.py @@ -7,6 +7,12 @@ class DAL_030: """Shadowy Figure""" # Battlecry: Transform into a_2/2 copy of a friendly Deathrattle minion. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_TARGET_WITH_DEATHRATTLE: 0, + } play = Morph(SELF, ExactCopy(TARGET)).then( Buff(Morph.CARD, "DAL_030e")) @@ -54,11 +60,16 @@ class DAL_011: # Reduce the Attack of an enemy minion by @ until your next turn. (Upgrades each # turn!) # TODO need test + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + } + play = Buff(TARGET, "DAL_011e") * (Attr(SELF, GameTag.QUEST_PROGRESS) + Number(1)) + class Hand: events = OWN_TURN_BEGIN.on(AddProgress(SELF, SELF)) - play = Buff(ENEMY_MINIONS, "DAL_011e") * (Attr(SELF, GameTag.QUEST_PROGRESS) + Number(1)) - class DAL_011e: tags = {GameTag.ATK: -1} @@ -68,16 +79,30 @@ class DAL_011e: class DAL_065: """Unsleeping Soul""" # Silence a friendly minion, then summon a copy of it. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Silence(TARGET), Summon(CONTROLLER, ExactCopy(TARGET)) class DAL_723: """Forbidden Words""" # [x]Spend all your Mana. Destroy a minion with that much Attack or less. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_MINION_ATTACK_LESS_OR_EQUAL_MANA: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = SpendMana(CONTROLLER, CURRENT_MANA(CONTROLLER)), Destroy(TARGET) class DAL_724: """Mass Resurrection""" # Summon 3 friendly minions that died this game. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + PlayReq.REQ_FRIENDLY_MINION_DIED_THIS_GAME: 0, + } play = Summon(CONTROLLER, Copy(RANDOM(FRIENDLY + KILLED + MINION) * 3)) diff --git a/fireplace/cards/dalaran/rogue.py b/fireplace/cards/dalaran/rogue.py index 5b7793075..5b52ed915 100644 --- a/fireplace/cards/dalaran/rogue.py +++ b/fireplace/cards/dalaran/rogue.py @@ -53,15 +53,23 @@ class DAL_010: """Togwaggle's Scheme""" # Choose a minion. Shuffle @ |4(copy, copies) of it into your deck. (Upgrades each # turn!) + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } + play = Shuffle(TARGET) * (Attr(SELF, GameTag.QUEST_PROGRESS) + Number(1)) + class Hand: events = OWN_TURN_BEGIN.on(AddProgress(SELF, SELF)) - play = Shuffle(TARGET) * (Attr(SELF, GameTag.QUEST_PROGRESS) + Number(1)) - class DAL_366: """Unidentified Contract""" # Destroy a minion. Gains a bonus effect in_your hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } entourage = ["DAL_366t1", "DAL_366t2", "DAL_366t3", "DAL_366t4"] play = Destroy(TARGET) draw = Morph(SELF, RandomEntourage()) @@ -70,35 +78,55 @@ class DAL_366: class DAL_366t1: """Assassin's Contract""" # Destroy a minion. Summon a 1/1 Patient Assassin. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET), Summon(CONTROLLER, "EX1_522") class DAL_366t2: """Recruitment Contract""" # Destroy a minion. Add_a copy of it to your hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET), Give(CONTROLLER, Copy(TARGET)) class DAL_366t3: """Lucrative Contract""" # Destroy a minion. Add 2 Coins to your hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET), Give(CONTROLLER, THE_COIN) * 2 class DAL_366t4: """Turncoat Contract""" # Destroy a minion. It_deals its damage to adjacent minions. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(SELF_ADJACENT, ATK(SELF), source=TARGET), Destroy(TARGET) class DAL_716: """Vendetta""" # Deal $4 damage to a minion. Costs (0) if you're holding a card from another class. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } + play = Hit(TARGET, 4) + class Hand: update = Find(FRIENDLY_HAND + ANOTHER_CLASS) & Refresh(SELF, {GameTag.COST: SET(0)}) - play = Hit(TARGET, 4) - class DAL_728: """Daring Escape""" diff --git a/fireplace/cards/dalaran/shaman.py b/fireplace/cards/dalaran/shaman.py index da1804cf2..d0415d6e0 100644 --- a/fireplace/cards/dalaran/shaman.py +++ b/fireplace/cards/dalaran/shaman.py @@ -57,12 +57,20 @@ class Hand: class DAL_071: """Mutate""" # Transform a friendly minion into a random one that costs (1) more. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Evolve(TARGET, 1) class DAL_432: """Witch's Brew""" # Restore #4 Health. Repeatable this turn. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = ( Heal(TARGET, 4), Give(CONTROLLER, "DAL_432").then(Buff(Give.CARD, "GIL_000")) diff --git a/fireplace/cards/dalaran/warlock.py b/fireplace/cards/dalaran/warlock.py index 67aafebb7..226310fe5 100644 --- a/fireplace/cards/dalaran/warlock.py +++ b/fireplace/cards/dalaran/warlock.py @@ -42,6 +42,11 @@ class DAL_606: """EVIL Genius""" # Battlecry: Destroy a friendly minion to add 2 random # Lackeys_to_your_hand. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET), Give(CONTROLLER, RandomLackey()) * 2 @@ -65,11 +70,14 @@ class DAL_607e: class DAL_007: """Rafaam's Scheme""" # Summon @ 1/1 |4(Imp, Imps). (Upgrades each turn!) + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } + play = Summon(CONTROLLER, "DAL_751t") * (Attr(SELF, GameTag.QUEST_PROGRESS) + Number(1)) + class Hand: events = OWN_TURN_BEGIN.on(AddProgress(SELF, SELF)) - play = Summon(CONTROLLER, "DAL_751t") * (Attr(SELF, GameTag.QUEST_PROGRESS) + Number(1)) - class DAL_173: """Darkest Hour""" @@ -92,6 +100,10 @@ def play(self): class DAL_605: """Impferno""" # Give your Demons +1 Attack. Deal $1 damage to all enemy minions. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_WITH_RACE: 15, + } play = Buff(FRIENDLY_MINIONS + DEMON, "DAL_605e"), Hit(ENEMY_MINIONS, 1) diff --git a/fireplace/cards/dalaran/warrior.py b/fireplace/cards/dalaran/warrior.py index b7d573f88..0a648ae19 100644 --- a/fireplace/cards/dalaran/warrior.py +++ b/fireplace/cards/dalaran/warrior.py @@ -39,6 +39,10 @@ class DAL_759: class DAL_770: """Omega Devastator""" # [x]Battlecry: If you have 10 Mana Crystals, deal 10 damage to a minion. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_MIN_MANA_CRYSTAL: 10, + } play = Hit(TARGET, 10) @@ -65,6 +69,10 @@ def play(self): class DAL_062: """Sweeping Strikes""" # Give a minion "Also damages minions next to whomever this attacks." + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "DAL_062e") @@ -75,6 +83,10 @@ class DAL_062e: class DAL_769: """Improve Morale""" # [x]Deal $1 damage to a minion. If it survives, add a Lackey to your hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 1), Dead(TARGET) | Give(CONTROLLER, RandomLackey()) diff --git a/fireplace/cards/gangs/druid.py b/fireplace/cards/gangs/druid.py index 6d14d3775..2be4454d6 100644 --- a/fireplace/cards/gangs/druid.py +++ b/fireplace/cards/gangs/druid.py @@ -36,6 +36,12 @@ class CFM_617: class CFM_816: """Virmen Sensei""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_WITH_RACE: 20, + } play = Buff(TARGET, "CFM_816e") @@ -82,6 +88,9 @@ class CFM_616: class CFM_713(JadeGolemUtils): """Jade Blossom""" + requirements = { + PlayReq.REQ_MINION_SLOT_OR_MANA_CRYSTAL_SLOT: 0, + } play = SummonJadeGolem(CONTROLLER), GainEmptyMana(CONTROLLER, 1) diff --git a/fireplace/cards/gangs/kazakus_potions.py b/fireplace/cards/gangs/kazakus_potions.py index af0f6acac..182d66ed7 100644 --- a/fireplace/cards/gangs/kazakus_potions.py +++ b/fireplace/cards/gangs/kazakus_potions.py @@ -7,6 +7,9 @@ class CFM_621t2: """Heart of Fire""" # 1 Cost: Deal 3 + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 3) @@ -58,6 +61,9 @@ class CFM_621t10: class CFM_621t16: """Heart of Fire""" # 5 Cost: Deal 5 Dmg + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 5) @@ -88,6 +94,9 @@ class CFM_621t20: class CFM_621t21: """Mystic Wool""" # 5 Cost: Polymorph 1 + requirements = { + PlayReq.REQ_MINIMUM_TOTAL_MINIONS: 1, + } play = Morph(RANDOM_ENEMY_MINION, "CFM_621_m5") @@ -115,6 +124,9 @@ class CFM_621t24: class CFM_621t25: """Heart of Fire""" # 10 Cost: Deal 10 + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 10) diff --git a/fireplace/cards/icecrown/druid.py b/fireplace/cards/icecrown/druid.py index 7d1ec9409..464623d44 100644 --- a/fireplace/cards/icecrown/druid.py +++ b/fireplace/cards/icecrown/druid.py @@ -76,11 +76,17 @@ class ICC_835: class ICC_050: """Webweave""" + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "ICC_832t3") * 2 class ICC_054: """Spreading Plague""" + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "ICC_832t4").then( (Count(FRIENDLY_MINIONS) < Count(ENEMY_MINIONS)) & CastSpell("ICC_054") ) @@ -127,6 +133,10 @@ class ICC_832b: class ICC_832p: + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } choose = ("ICC_832pa", "ICC_832pb") activate = ChooseBoth(CONTROLLER) & ( GainArmor(FRIENDLY_HERO, 3), Buff(FRIENDLY_HERO, "ICC_832e") diff --git a/fireplace/cards/icecrown/hunter.py b/fireplace/cards/icecrown/hunter.py index b70377931..504c70f64 100644 --- a/fireplace/cards/icecrown/hunter.py +++ b/fireplace/cards/icecrown/hunter.py @@ -38,11 +38,21 @@ class ICC_825: class ICC_049: """Toxic Arrow""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 2), Dead(TARGET) | GivePoisonous(TARGET) class ICC_052: """Play Dead""" + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_WITH_DEATHRATTLE: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Deathrattle(TARGET) @@ -62,4 +72,7 @@ class ICC_828: class ICC_828p: + requirements = { + PlayReq.REQ_HAND_NOT_FULL: 0, + } activate = CreateZombeast(CONTROLLER) diff --git a/fireplace/cards/icecrown/mage.py b/fireplace/cards/icecrown/mage.py index e077408c0..3db0e6126 100644 --- a/fireplace/cards/icecrown/mage.py +++ b/fireplace/cards/icecrown/mage.py @@ -23,6 +23,10 @@ class ICC_083: class ICC_252: """Coldwraith""" + requirements = { + PlayReq.REQ_FROZEN_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Find(ENEMY + FROZEN) & Draw(CONTROLLER) @@ -47,6 +51,9 @@ class ICC_082: class ICC_086: """Glacial Mysteries""" + requirements = { + PlayReq.REQ_SECRET_ZONE_CAP_FOR_NON_SECRET: 0, + } play = Summon(CONTROLLER, FRIENDLY_DECK + SECRET) @@ -73,6 +80,9 @@ class ICC_833: class ICC_833h: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } activate = Hit(TARGET, 1).then(Dead(TARGET) & Summon(CONTROLLER, "ICC_833t")) diff --git a/fireplace/cards/icecrown/neutral_common.py b/fireplace/cards/icecrown/neutral_common.py index ae02b1fa6..a06815d3b 100644 --- a/fireplace/cards/icecrown/neutral_common.py +++ b/fireplace/cards/icecrown/neutral_common.py @@ -45,6 +45,11 @@ class ICC_067: class ICC_092: """Acherus Veteran""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "ICC_092e") @@ -53,6 +58,11 @@ class ICC_092: class ICC_093: """Tuskarr Fisherman""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "ICC_093e") @@ -61,6 +71,11 @@ class ICC_093: class ICC_094: """Fallen Sun Cleric""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "ICC_094e") @@ -77,6 +92,11 @@ class ICC_097: class ICC_467: """Deathspeaker""" + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = Buff(TARGET, "ICC_467e") @@ -90,6 +110,11 @@ class ICC_468: class ICC_705: """Bonemare""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Buff(TARGET, "ICC_705e") diff --git a/fireplace/cards/icecrown/neutral_legendary.py b/fireplace/cards/icecrown/neutral_legendary.py index be3506e9e..01ef4e79b 100644 --- a/fireplace/cards/icecrown/neutral_legendary.py +++ b/fireplace/cards/icecrown/neutral_legendary.py @@ -48,11 +48,18 @@ class ICC_314t4: class ICC_314t5: """Death Coil""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Find(TARGET + ENEMY) & Hit(TARGET, 5) | Heal(TARGET, 5) class ICC_314t6: """Obliterate""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Destroy(TARGET).then(Hit(FRIENDLY_HERO, ATK(TARGET))) @@ -84,6 +91,10 @@ class ICC_851: class ICC_852: """Prince Taldaram""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_NO_3_COST_CARD_IN_DECK: 0, + } play = Morph(SELF, ExactCopy(TARGET)).then( Buff(Morph.CARD, "ICC_852e")) diff --git a/fireplace/cards/icecrown/neutral_rare.py b/fireplace/cards/icecrown/neutral_rare.py index 921f6ba86..141469f0a 100644 --- a/fireplace/cards/icecrown/neutral_rare.py +++ b/fireplace/cards/icecrown/neutral_rare.py @@ -24,6 +24,11 @@ class ICC_099: class ICC_257: """Corpse Raiser""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "ICC_257e") diff --git a/fireplace/cards/icecrown/paladin.py b/fireplace/cards/icecrown/paladin.py index f7d470922..62c9a389b 100644 --- a/fireplace/cards/icecrown/paladin.py +++ b/fireplace/cards/icecrown/paladin.py @@ -32,6 +32,10 @@ class ICC_858: class ICC_039: """Dark Conviction""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Buff(TARGET, "ICC_039e") @@ -42,6 +46,10 @@ class ICC_039e: class ICC_244: """Desperate Stand""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "ICC_244e") @@ -70,6 +78,9 @@ class ICC_829: class ICC_829p: + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } entourage = ["ICC_829t2", "ICC_829t3", "ICC_829t4", "ICC_829t5"] activate = Summon(CONTROLLER, RandomEntourage(exclude=FRIENDLY_MINIONS)) update = FindAll( diff --git a/fireplace/cards/icecrown/priest.py b/fireplace/cards/icecrown/priest.py index 64d0860d2..e96a81557 100644 --- a/fireplace/cards/icecrown/priest.py +++ b/fireplace/cards/icecrown/priest.py @@ -32,6 +32,10 @@ class ICC_207: class ICC_213: """Eternal Servitude""" + requirements = { + PlayReq.REQ_FRIENDLY_MINION_DIED_THIS_GAME: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Choice(CONTROLLER, Copy(RANDOM(DeDuplicate(FRIENDLY + KILLED + MINION)) * 3)).then( Summon(CONTROLLER, Choice.CARD) ) @@ -39,6 +43,9 @@ class ICC_213: class ICC_235: """Shadow Essence""" + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, RANDOM(FRIENDLY_DECK + MINION)).then( Buff(Summon.CARD, "ICC_235e") ) @@ -56,6 +63,11 @@ class ICC_802: class ICC_849: """Embrace Darkness""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + } play = Buff(TARGET, "ICC_849e") @@ -74,5 +86,8 @@ class ICC_830: class ICC_830p: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } activate = Hit(TARGET, 2) events = Play(CONTROLLER).after(RefreshHeroPower(SELF)) diff --git a/fireplace/cards/icecrown/rogue.py b/fireplace/cards/icecrown/rogue.py index f7f6c1586..81d5e6592 100644 --- a/fireplace/cards/icecrown/rogue.py +++ b/fireplace/cards/icecrown/rogue.py @@ -16,6 +16,11 @@ class ICC_240: class ICC_809: """Plague Scientist""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_TARGET_FOR_COMBO: 0, + } combo = GivePoisonous(TARGET) @@ -27,6 +32,9 @@ class ICC_811: class ICC_910: """Spectral Pillager""" + requirements = { + PlayReq.REQ_TARGET_FOR_COMBO: 0, + } combo = Hit(TARGET, Count(CARDS_PLAYED_THIS_TRUN)) @@ -40,11 +48,19 @@ class ICC_201: class ICC_221: """Leeching Poison""" + requirements = { + PlayReq.REQ_WEAPON_EQUIPPED: 0, + } play = GiveLifesteal(FRIENDLY_WEAPON) class ICC_233: """Doomerang""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_WEAPON_EQUIPPED: 0, + } play = Hit(TARGET, ATK(FRIENDLY_WEAPON)), Bounce(FRIENDLY_WEAPON) @@ -83,6 +99,10 @@ class ICC_827p: class ICC_827t: + requirements = { + PlayReq.REQ_MUST_PLAY_OTHER_CARD_FIRST: 0, + } + class Hand: events = ( Play(CONTROLLER).on( diff --git a/fireplace/cards/icecrown/shaman.py b/fireplace/cards/icecrown/shaman.py index 4b204930a..e69673224 100644 --- a/fireplace/cards/icecrown/shaman.py +++ b/fireplace/cards/icecrown/shaman.py @@ -6,6 +6,10 @@ class ICC_058: """Brrrloc""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + } play = Freeze(TARGET) @@ -30,6 +34,10 @@ class ICC_289: class ICC_056: """Cryostasis""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "ICC_056e"), Freeze(TARGET) @@ -38,6 +46,10 @@ class ICC_056: class ICC_078: """Avalanche""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 3), Freeze(TARGET_ADJACENT) @@ -65,4 +77,9 @@ class ICC_481: class ICC_481p: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } activate = Evolve(TARGET, 1) diff --git a/fireplace/cards/icecrown/warlock.py b/fireplace/cards/icecrown/warlock.py index 06115499c..76fafc16b 100644 --- a/fireplace/cards/icecrown/warlock.py +++ b/fireplace/cards/icecrown/warlock.py @@ -26,6 +26,11 @@ class ICC_841: class ICC_903: """Sanguine Reveler""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET), Buff(SELF, "ICC_903t") @@ -53,11 +58,21 @@ class ICC_055: class ICC_206: """Treachery""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Steal(TARGET, OPPONENT) class ICC_469: """Unwilling Sacrifice""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET), Destroy(RANDOM_ENEMY_MINION) @@ -70,4 +85,7 @@ class ICC_831: class ICC_831p: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } activate = Hit(TARGET, 3) diff --git a/fireplace/cards/karazhan/collectible.py b/fireplace/cards/karazhan/collectible.py index 39e447dd4..c66c5e150 100644 --- a/fireplace/cards/karazhan/collectible.py +++ b/fireplace/cards/karazhan/collectible.py @@ -76,6 +76,10 @@ class KAR_037: class KAR_041: """Moat Lurker""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET) deathrattle = HAS_TARGET & Summon(TARGET_PLAYER, Copy(TARGET)) diff --git a/fireplace/cards/kobolds/druid.py b/fireplace/cards/kobolds/druid.py index e1680ecd4..d911ff9ac 100644 --- a/fireplace/cards/kobolds/druid.py +++ b/fireplace/cards/kobolds/druid.py @@ -40,6 +40,10 @@ class LOOT_351: class LOOT_047: """Barkskin""" # Give a minion +3 Health. Gain 3 Armor. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Buff(TARGET, "LOOT_047e"), GainArmor(FRIENDLY_HERO, 3) @@ -49,6 +53,10 @@ class LOOT_047: class LOOT_051: """Lesser Jasper Spellstone""" # Deal $2 damage to a minion. @(Gain 3 Armor to upgrade.) + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } progress_total = 3 play = Hit(TARGET, 2) reward = Morph(SELF, "LOOT_051t1") @@ -61,6 +69,10 @@ class Hand: class LOOT_051t1: """Jasper Spellstone""" # Deal $4 damage to a minion. @ + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 4) progress_total = 3 reward = Morph(SELF, "LOOT_051t2") @@ -73,6 +85,10 @@ class Hand: class LOOT_051t2: """Greater Jasper Spellstone""" # Deal $6 damage to a minion. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 6) diff --git a/fireplace/cards/kobolds/hunter.py b/fireplace/cards/kobolds/hunter.py index 7cd2789cd..c35ac9692 100644 --- a/fireplace/cards/kobolds/hunter.py +++ b/fireplace/cards/kobolds/hunter.py @@ -28,6 +28,10 @@ class LOOT_520: class LOOT_077: """Flanking Strike""" # Deal $3 damage to a minion. Summon a 3/3 Wolf. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 3), Summon(CONTROLLER, "LOOT_077t") @@ -43,6 +47,9 @@ class LOOT_079: class LOOT_080: """Lesser Emerald Spellstone""" # Summon two 3/3_Wolves. (Play a Secret to upgrade.) + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Summon(CONTROLLER, "LOOT_077t") * 2 class Hand: @@ -52,6 +59,9 @@ class Hand: class LOOT_080t2: """Emerald Spellstone""" # Summon three 3/3_Wolves. (Play a Secret to upgrade.) + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Summon(CONTROLLER, "LOOT_077t") * 3 class Hand: @@ -67,6 +77,10 @@ class LOOT_080t3: class LOOT_217: """To My Side!""" # [x]Summon an Animal Companion, or 2 if your deck has no minions. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } entourage = ["NEW1_032", "NEW1_033", "NEW1_034"] play = Find(FRIENDLY_DECK + MINION) & ( Summon(CONTROLLER, RandomEntourage()) diff --git a/fireplace/cards/kobolds/mage.py b/fireplace/cards/kobolds/mage.py index 44b49b783..6a1b54f4a 100644 --- a/fireplace/cards/kobolds/mage.py +++ b/fireplace/cards/kobolds/mage.py @@ -84,6 +84,10 @@ class LOOT_103t2: class LOOT_104: """Shifting Scroll""" # Each turn this is in your hand, transform it into a random Mage spell. + requirements = { + PlayReq.REQ_CANNOT_PLAY_THIS: 0, + } + class Hand: events = OWN_TURN_BEGIN.on( Morph(SELF, RandomSpell(card_class=CardClass.MAGE)).then( diff --git a/fireplace/cards/kobolds/neutral_common.py b/fireplace/cards/kobolds/neutral_common.py index bc296fc2f..10fdfb630 100644 --- a/fireplace/cards/kobolds/neutral_common.py +++ b/fireplace/cards/kobolds/neutral_common.py @@ -7,6 +7,9 @@ class LOOT_069: """Sewer Crawler""" # Battlecry: Summon a 2/3_Giant Rat. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Summon(CONTROLLER, "LOOT_069t") @@ -25,6 +28,10 @@ class LOOT_131: class LOOT_132: """Dragonslayer""" # Battlecry: Deal 6 damage to a Dragon. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_TARGET_WITH_RACE: 24, + } play = Hit(TARGET, 6) @@ -92,6 +99,9 @@ class LOOT_233: class LOOT_291: """Shroom Brewer""" # Battlecry: Restore 4_Health. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = Heal(TARGET, 4) diff --git a/fireplace/cards/kobolds/neutral_epic.py b/fireplace/cards/kobolds/neutral_epic.py index a684a6574..1bcb3395f 100644 --- a/fireplace/cards/kobolds/neutral_epic.py +++ b/fireplace/cards/kobolds/neutral_epic.py @@ -38,6 +38,11 @@ class LOOT_161: """Carnivorous Cube""" # Battlecry: Destroy a friendly minion. Deathrattle: Summon 2 copies of # it. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Destroy(TARGET) deathrattle = HAS_TARGET & Summon(CONTROLLER, Copy(TARGET)) * 2 diff --git a/fireplace/cards/kobolds/neutral_legendary.py b/fireplace/cards/kobolds/neutral_legendary.py index e7b9256aa..4c0f8c38b 100644 --- a/fireplace/cards/kobolds/neutral_legendary.py +++ b/fireplace/cards/kobolds/neutral_legendary.py @@ -17,12 +17,18 @@ class LOOT_357l: class LOOT_998h: + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Draw(CONTROLLER).then(Give(CONTROLLER, Copy(Draw.CARD)) * ( MAX_HAND_SIZE(CONTROLLER) - Count(FRIENDLY_HAND) )) class LOOT_998j: + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Discover(CONTROLLER, RandomLegendaryMinion()).then( Summon(CONTROLLER, Discover.CARD) * 2 ) @@ -44,6 +50,11 @@ class LOOT_998k: class LOOT_516: """Zola the Gorgon""" # Battlecry: Choose a friendly minion. Add a Golden copy of it to your hand. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Give(CONTROLLER, Copy(TARGET)) diff --git a/fireplace/cards/kobolds/neutral_rare.py b/fireplace/cards/kobolds/neutral_rare.py index 82ad06737..ec935fab5 100644 --- a/fireplace/cards/kobolds/neutral_rare.py +++ b/fireplace/cards/kobolds/neutral_rare.py @@ -7,6 +7,11 @@ class LOOT_111: """Scorp-o-matic""" # Battlecry: Destroy a minion with 1 or less Attack. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_MAX_ATTACK: 1, + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = Destroy(TARGET) @@ -34,6 +39,11 @@ class LOOT_124: class LOOT_150: """Furbolg Mossbinder""" # Battlecry: Transform a friendly minion into a 6/6_Elemental. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Morph(TARGET, "LOOT_150t1") diff --git a/fireplace/cards/kobolds/paladin.py b/fireplace/cards/kobolds/paladin.py index 3ef4cd3cd..a3ce750ca 100644 --- a/fireplace/cards/kobolds/paladin.py +++ b/fireplace/cards/kobolds/paladin.py @@ -34,12 +34,19 @@ class LOOT_398: class LOOT_088: """Potion of Heroism""" # Give a minion Divine_Shield. Draw a card. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = GiveDivineShield(TARGET), Draw(CONTROLLER) class LOOT_091: """Lesser Pearl Spellstone""" # Summon a 2/2 Spirit with Taunt. @(Restore 3 Health to upgrade.) + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } progress_total = 3 play = Summon(CONTROLLER, "LOOT_091t") reward = Morph(SELF, "LOOT_091t1") @@ -51,6 +58,9 @@ class Hand: class LOOT_091t1: """Pearl Spellstone""" # Summon a 4/4 Spirit with Taunt. @ + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } progress_total = 3 play = Summon(CONTROLLER, "LOOT_091t1t") reward = Morph(SELF, "LOOT_091t2") @@ -62,6 +72,9 @@ class Hand: class LOOT_091t2: """Greater Pearl Spellstone""" # Summon a 6/6 Spirit with Taunt. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Summon(CONTROLLER, "LOOT_091t2t") diff --git a/fireplace/cards/kobolds/priest.py b/fireplace/cards/kobolds/priest.py index 8854612b2..1e9a0ecd7 100644 --- a/fireplace/cards/kobolds/priest.py +++ b/fireplace/cards/kobolds/priest.py @@ -7,6 +7,10 @@ class LOOT_410: """Duskbreaker""" # Battlecry: If you're holding a Dragon, deal 3 damage to all other minions. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + } play = HOLDING_DRAGON & Hit(ALL_MINIONS - SELF, 3) @@ -14,6 +18,10 @@ class LOOT_528: """Twilight Acolyte""" # Battlecry: If you're holding a Dragon, swap this minion's Attack with another # minion's. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_DRAGON_IN_HAND: 0, + } play = HOLDING_DRAGON & SwapStateBuff(TARGET, SELF, "LOOT_528e") @@ -43,12 +51,19 @@ def play(self): class LOOT_008: """Psychic Scream""" # Shuffle all minions into your opponent's deck. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + } play = Shuffle(OPPONENT, ALL_MINIONS) class LOOT_187: """Twilight's Call""" # Summon 1/1 copies of 2 friendly Deathrattle minions that died this game. + requirements = { + PlayReq.REQ_FRIENDLY_MINION_DIED_THIS_GAME: 0, + } play = Summon(CONTROLLER, Copy(RANDOM(FRIENDLY + KILLED + MINION + DEATHRATTLE))).then( Buff(Summon.CARD, "LOOT_187e")) * 2 @@ -61,6 +76,10 @@ class LOOT_187e: class LOOT_278: """Unidentified Elixir""" # Give a minion +2/+2. Gains a bonus effect in_your hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "LOOT_278e") entourage = ["LOOT_278t1", "LOOT_278t2", "LOOT_278t3", "LOOT_278t4"] draw = Morph(SELF, RandomEntourage()) @@ -72,6 +91,10 @@ class LOOT_278: class LOOT_278t1: """Elixir of Life""" # Give a minion +2/+2 and Lifesteal. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "LOOT_278t1e") @@ -81,6 +104,10 @@ class LOOT_278t1: class LOOT_278t2: """Elixir of Purity""" # Give a minion +2/+2 and Divine Shield. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "LOOT_278t2e") @@ -97,6 +124,10 @@ def apply(self, target): class LOOT_278t3: """Elixir of Shadows""" # Give a minion +2/+2. Summon a 1/1 copy of_it. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = ( Buff(TARGET, "LOOT_278t3e"), Summon(CONTROLLER, ExactCopy(TARGET)).then(Buff(Summon.CARD, "LOOT_278t3e2")) @@ -114,6 +145,10 @@ class LOOT_278t3e2: class LOOT_278t4: """Elixir of Hope""" # [x]Give a minion +2/+2 and "Deathrattle: Return this minion to your hand." + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "LOOT_278t4e") diff --git a/fireplace/cards/kobolds/rogue.py b/fireplace/cards/kobolds/rogue.py index 3201629e2..901afe4c7 100644 --- a/fireplace/cards/kobolds/rogue.py +++ b/fireplace/cards/kobolds/rogue.py @@ -40,6 +40,10 @@ class LOOT_165e: class LOOT_211: """Elven Minstrel""" # Combo: Draw 2 minions from your deck. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } combo = ForceDraw(RANDOM(FRIENDLY_DECK + MINION)) @@ -96,6 +100,9 @@ class LOOT_214: class LOOT_503: """Lesser Onyx Spellstone""" # Destroy 1 random enemy minion. @(Play 3 Deathrattle cards to upgrade.) + requirements = { + PlayReq.REQ_MINIMUM_ENEMY_MINIONS: 1, + } play = Destroy(RANDOM_ENEMY_MINION) progress_total = 3 reward = Morph(SELF, "LOOT_503t") @@ -107,6 +114,9 @@ class Hand: class LOOT_503t: """Onyx Spellstone""" # Destroy up to 2 random enemy minions. @ + requirements = { + PlayReq.REQ_MINIMUM_ENEMY_MINIONS: 1, + } play = Destroy(RANDOM_ENEMY_MINION * 2) progress_total = 3 reward = Morph(SELF, "LOOT_503t") @@ -118,6 +128,9 @@ class Hand: class LOOT_503t2: """Greater Onyx Spellstone""" # Destroy up to 3 random enemy minions. + requirements = { + PlayReq.REQ_MINIMUM_ENEMY_MINIONS: 1, + } play = Destroy(RANDOM_ENEMY_MINION * 3) diff --git a/fireplace/cards/kobolds/shaman.py b/fireplace/cards/kobolds/shaman.py index 3808372d1..492ed7f20 100644 --- a/fireplace/cards/kobolds/shaman.py +++ b/fireplace/cards/kobolds/shaman.py @@ -49,6 +49,10 @@ class LOOT_518: class LOOT_060: """Crushing Hand""" # Deal $8 damage to a minion. Overload: (3) + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 8) @@ -56,6 +60,11 @@ class LOOT_064: """Lesser Sapphire Spellstone""" # Summon 1 copy of a friendly minion. @(Overload 3 Mana Crystals to # upgrade.) + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Summon(CONTROLLER, ExactCopy(TARGET)) progress_total = 3 reward = Morph(SELF, "LOOT_064t1") @@ -67,6 +76,11 @@ class Hand: class LOOT_064t1: """Sapphire Spellstone""" # Summon 2 copies of a friendly minion. @ + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Summon(CONTROLLER, ExactCopy(TARGET)) * 2 progress_total = 3 reward = Morph(SELF, "LOOT_064t2") @@ -78,6 +92,11 @@ class Hand: class LOOT_064t2: """Greater Sapphire Spellstone""" # Summon 3 copies of a friendly minion. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Summon(CONTROLLER, ExactCopy(TARGET)) * 3 @@ -103,10 +122,20 @@ class LOOT_373: class LOOT_504: """Unstable Evolution""" # Transform a friendly minion into one that costs (1) more. Repeatable this turn. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Evolve(TARGET, 1), Give(CONTROLLER, "LOOT_504t") class LOOT_504t: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Evolve(TARGET, 1), Give(CONTROLLER, "LOOT_504t") events = OWN_TURN_END.on(Destroy(SELF)) diff --git a/fireplace/cards/kobolds/warlock.py b/fireplace/cards/kobolds/warlock.py index af32cb73a..01fe12980 100644 --- a/fireplace/cards/kobolds/warlock.py +++ b/fireplace/cards/kobolds/warlock.py @@ -46,30 +46,45 @@ class LOOT_415: class LOOT_415t1: """The First Seal""" # Summon a 2/2 Demon. Add 'The Second Seal' to your hand. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "LOOT_415t1t"), Give(CONTROLLER, "LOOT_415t2") class LOOT_415t2: """The Second Seal""" # Summon a 3/3 Demon. Add 'The Third Seal' to your hand. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "LOOT_415t2t"), Give(CONTROLLER, "LOOT_415t3") class LOOT_415t3: """The Third Seal""" # Summon a 4/4 Demon. Add 'The Fourth Seal' to your hand. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "LOOT_415t3t"), Give(CONTROLLER, "LOOT_415t4") class LOOT_415t4: """The Fourth Seal""" # Summon a 5/5 Demon. Add 'The Final Seal' to your hand. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "LOOT_415t4t"), Give(CONTROLLER, "LOOT_415t5") class LOOT_415t5: """The Final Seal""" # [x]Summon a 6/6 Demon. Add 'Azari, the Devourer' to your hand. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "LOOT_415t5t"), Give(CONTROLLER, "LOOT_415t6") @@ -85,6 +100,11 @@ class LOOT_415t6: class LOOT_017: """Dark Pact""" # Destroy a friendly minion. Restore #4 Health to your hero. + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET), Heal(FRIENDLY_HERO, 4) @@ -92,6 +112,10 @@ class LOOT_043: """Lesser Amethyst Spellstone""" # Lifesteal. Deal $3 damage to a minion. (Take damage from your cards to # upgrade.) + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 3) class Hand: @@ -102,6 +126,10 @@ class LOOT_043t2: """Amethyst Spellstone""" # Lifesteal. Deal $5 damage to a minion. (Take damage from your cards to # upgrade.) + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 5) class Hand: @@ -111,6 +139,10 @@ class Hand: class LOOT_043t3: """Greater Amethyst Spellstone""" # Lifesteal. Deal $7 damage to a minion. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 7) diff --git a/fireplace/cards/kobolds/warrior.py b/fireplace/cards/kobolds/warrior.py index 35dfeee6e..c8426f0c3 100644 --- a/fireplace/cards/kobolds/warrior.py +++ b/fireplace/cards/kobolds/warrior.py @@ -74,6 +74,9 @@ class LOOT_285t: class LOOT_285t2: """Serrated Shield""" # Gain 5 Armor. Deal 5 damage. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = GainArmor(FRIENDLY_HERO, 5), Hit(TARGET, 5) diff --git a/fireplace/cards/troll/druid.py b/fireplace/cards/troll/druid.py index 79cee80cb..08387043f 100644 --- a/fireplace/cards/troll/druid.py +++ b/fireplace/cards/troll/druid.py @@ -25,6 +25,11 @@ class TRL_232: class TRL_240: """Savage Striker""" # Battlecry: Deal damage to an enemy minion equal to your hero's Attack. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_HERO_HAS_ATTACK: 0, + } play = Hit(TARGET, ATK(FRIENDLY_HERO)) @@ -88,6 +93,10 @@ class TRL_244: class TRL_254: """Mark of the Loa""" # Choose One - Give a minion +2/+4 and Taunt; or Summon two 3/2 Raptors. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + } choose = ("TRL_254a", "TRL_254b") play = ChooseBoth(CONTROLLER) & ( Buff(TARGET, "TRL_254ae"), @@ -96,6 +105,10 @@ class TRL_254: class TRL_254a: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "TRL_254ae") @@ -103,12 +116,21 @@ class TRL_254a: class TRL_254b: + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "TRL_254t") * 2 class TRL_255: """Stampeding Roar""" # Summon a random Beast from your hand and give it Rush. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + PlayReq.REQ_FRIENDLY_MINION_OF_RACE_IN_HAND: 20, + } play = Summon(CONTROLLER, RANDOM(FRIENDLY_HAND + BEAST)).then( Buff(Summon.CARD, "TRL_255e") ) diff --git a/fireplace/cards/troll/hunter.py b/fireplace/cards/troll/hunter.py index c9019b9d2..e4aa390ba 100644 --- a/fireplace/cards/troll/hunter.py +++ b/fireplace/cards/troll/hunter.py @@ -42,6 +42,12 @@ class TRL_901: class TRL_119: """The Beast Within""" # Give a friendly Beast +1/+1, then it attacks a random enemy minion. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_TARGET_WITH_RACE: 20, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Buff(TARGET, "TRL_119e").then(Attack(TARGET, RANDOM_ENEMY_MINION)) @@ -62,6 +68,9 @@ def play(self): class TRL_347: """Baited Arrow""" # Deal $3 damage. Overkill: Summon a 5/5 Devilsaur. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 3) overkill = Summon(CONTROLLER, "TRL_347t") @@ -69,6 +78,10 @@ class TRL_347: class TRL_566: """Revenge of the Wild""" # Summon your Beasts that died this turn. + requirements = { + PlayReq.REQ_FRIENDLY_MINION_OF_RACE_DIED_THIS_TURN: 20, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, Copy(FRIENDLY + BEAST + KILLED_THIS_TURN)) @@ -95,4 +108,7 @@ class TRL_065: class TRL_065h: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } activate = Hit(TARGET, 2) diff --git a/fireplace/cards/troll/mage.py b/fireplace/cards/troll/mage.py index 028ae9cee..0ed1a7c2f 100644 --- a/fireplace/cards/troll/mage.py +++ b/fireplace/cards/troll/mage.py @@ -78,6 +78,10 @@ class TRL_310e: class TRL_313: """Scorch""" # [x]Deal $4 damage to a minion. Costs (1) if you played an Elemental last turn. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } cost_mod = ELEMENTAL_PLAYED_LAST_TURN & -1 play = Hit(TARGET, 4) diff --git a/fireplace/cards/troll/neutral_common.py b/fireplace/cards/troll/neutral_common.py index d4549b244..682ca098c 100644 --- a/fireplace/cards/troll/neutral_common.py +++ b/fireplace/cards/troll/neutral_common.py @@ -99,6 +99,10 @@ class TRL_509: class TRL_509t: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "TRL_509te") @@ -108,6 +112,9 @@ class TRL_509t: class TRL_512: """Cheaty Anklebiter""" # Lifesteal Battlecry: Deal 1 damage. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = Hit(TARGET, 1) diff --git a/fireplace/cards/troll/neutral_epic.py b/fireplace/cards/troll/neutral_epic.py index 072693a62..6312d7042 100644 --- a/fireplace/cards/troll/neutral_epic.py +++ b/fireplace/cards/troll/neutral_epic.py @@ -73,5 +73,10 @@ class TRL_535: class TRL_569: """Crowd Roaster""" # [x]Battlecry: If you're holding a Dragon, deal 7 damage to an enemy minion. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_DRAGON_IN_HAND: 0, + } powered_up = HOLDING_DRAGON play = powered_up & Hit(TARGET, 7) diff --git a/fireplace/cards/troll/neutral_rare.py b/fireplace/cards/troll/neutral_rare.py index f0937c752..23ebfcb9a 100644 --- a/fireplace/cards/troll/neutral_rare.py +++ b/fireplace/cards/troll/neutral_rare.py @@ -13,6 +13,9 @@ class TRL_057: class TRL_407: """Waterboy""" # Battlecry: Your next Hero Power this turn costs (0). + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(CONTROLLER, "TRL_407e") @@ -59,6 +62,12 @@ class TRL_523: class TRL_524: """Shieldbreaker""" # Battlecry: Silence an enemy minion with Taunt. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_MUST_TARGET_TAUNTER: 0, + } play = Silence(TARGET) diff --git a/fireplace/cards/troll/paladin.py b/fireplace/cards/troll/paladin.py index 6f2825e81..6c9542f17 100644 --- a/fireplace/cards/troll/paladin.py +++ b/fireplace/cards/troll/paladin.py @@ -56,6 +56,9 @@ class TRL_545: class TRL_302: """Time Out!""" # Your hero is Immune until your next turn. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(SELF, "TRL_302e") @@ -71,6 +74,10 @@ class TRL_305: """A New Challenger...""" # Discover a 6-Cost minion. Summon it with Taunt and Divine # Shield. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Discover(CONTROLLER, RandomMinion(cost=6)).then( Summon(CONTROLLER, Discover.CARD).then( Taunt(Summon.CARD), @@ -82,6 +89,9 @@ class TRL_305: class TRL_307: """Flash of Light""" # Restore #4 Health. Draw a card. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Heal(TARGET, 4), Draw(CONTROLLER) diff --git a/fireplace/cards/troll/priest.py b/fireplace/cards/troll/priest.py index 75925e287..82039ef1e 100644 --- a/fireplace/cards/troll/priest.py +++ b/fireplace/cards/troll/priest.py @@ -62,18 +62,30 @@ class TRL_502e: class TRL_097: """Seance""" # Choose a minion. Add_a copy of it to your hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Give(CONTROLLER, Copy(TARGET)) class TRL_128: """Regenerate""" # Restore #3 Health. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Heal(TARGET, 3) class TRL_258: """Mass Hysteria""" # Force each minion to_attack another random minion. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_ENEMY_TARGET: 0, + } + def play(self): board = ALL_MINIONS.eval(self.game, self) random.shuffle(board) diff --git a/fireplace/cards/troll/rogue.py b/fireplace/cards/troll/rogue.py index 279d0d0f3..c82563f89 100644 --- a/fireplace/cards/troll/rogue.py +++ b/fireplace/cards/troll/rogue.py @@ -17,6 +17,9 @@ class TRL_077: """Gurubashi Hypemon""" # Battlecry: Discover a 1/1 copy of a Battlecry minion. It costs # (1). + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Discover(CONTROLLER, RandomMinion(battlecry=True)).then( Give(CONTROLLER, Buff(Buff(Discover.CARD, "TRL_077e"), "GBL_001e")) ) @@ -92,6 +95,11 @@ class TRL_156: class TRL_157: """Walk the Plank""" # Destroy an undamaged minion. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_UNDAMAGED_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Destroy(TARGET) diff --git a/fireplace/cards/troll/shaman.py b/fireplace/cards/troll/shaman.py index 54f04f323..561526f20 100644 --- a/fireplace/cards/troll/shaman.py +++ b/fireplace/cards/troll/shaman.py @@ -7,6 +7,11 @@ class TRL_059: """Bog Slosher""" # Battlecry: Return a friendly minion to your hand and give it +2/+2. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Bounce(TARGET), Buff(TARGET, "TRL_059e") @@ -48,6 +53,9 @@ class TRL_345: class TRL_522: """Wartbringer""" # Battlecry: If you played 2_spells this turn, deal 2_damage. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_MINIMUM_SPELLS_PLAYED_THIS_TURN: 2, + } powered_up = Count(CARDS_PLAYED_THIS_TRUN + SPELL) >= 2 play = powered_up & Hit(TARGET, 2) @@ -58,6 +66,9 @@ class TRL_522: class TRL_012: """Totemic Smash""" # Deal $2 damage. Overkill: Summon a basic Totem. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 2) overkill = Summon(CONTROLLER, RandomBasicTotem()) @@ -80,6 +91,11 @@ class TRL_082: """Big Bad Voodoo""" # Give a friendly minion "Deathrattle: Summon a random minion that costs (1) # more." + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Buff(TARGET, "TRL_082e") @@ -91,6 +107,9 @@ class TRL_082e: class TRL_351: """Rain of Toads""" # Summon three 2/4 Toads with Taunt. Overload: (3) + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "TRL_351t") * 3 diff --git a/fireplace/cards/troll/warlock.py b/fireplace/cards/troll/warlock.py index bbdb21578..79960cd34 100644 --- a/fireplace/cards/troll/warlock.py +++ b/fireplace/cards/troll/warlock.py @@ -74,6 +74,11 @@ class TRL_246: class TRL_249: """Grim Rally""" # Destroy a friendly minion. Give your minions +1/+1. + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Destroy(TARGET), Buff(FRIENDLY_MINIONS, "TRL_249e") @@ -83,5 +88,9 @@ class TRL_249: class TRL_555: """Demonbolt""" # Destroy a minion. Costs (1) less for each minion you control. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } cost_mod = -Count(FRIENDLY_MINIONS) play = Destroy(TARGET) diff --git a/fireplace/cards/troll/warrior.py b/fireplace/cards/troll/warrior.py index fbacf0dd4..53353d985 100644 --- a/fireplace/cards/troll/warrior.py +++ b/fireplace/cards/troll/warrior.py @@ -14,6 +14,12 @@ class TRL_323: class TRL_326: """Smolderthorn Lancer""" # Battlecry: If you're holding a Dragon, destroy a damaged enemy minion. + requirements = { + PlayReq.REQ_ENEMY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_DRAGON_IN_HAND: 0, + PlayReq.REQ_DAMAGED_TARGET: 0, + } powered_up = HOLDING_DRAGON play = powered_up & Destroy(TARGET) @@ -52,12 +58,21 @@ class TRL_329: class TRL_321: """Devastate""" # Deal $4 damage to a damaged minion. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_DAMAGED_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 4) class TRL_324: """Heavy Metal!""" # [x]Summon a random minion with Cost equal to your Armor (up to 10). + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, RandomMinion(cost=Min(ARMOR(FRIENDLY_HERO), 10))) diff --git a/fireplace/cards/ungoro/adapt_buff.py b/fireplace/cards/ungoro/adapt_buff.py index bbbacdf43..092034b15 100644 --- a/fireplace/cards/ungoro/adapt_buff.py +++ b/fireplace/cards/ungoro/adapt_buff.py @@ -49,40 +49,80 @@ def apply(self, target): class UNG_999t10: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t10e") class UNG_999t2: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t2e") class UNG_999t3: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t3e") class UNG_999t4: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t4e") class UNG_999t5: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t5e") class UNG_999t6: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t6e") class UNG_999t7: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t7e") class UNG_999t8: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t8e") class UNG_999t13: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t13e") class UNG_999t14: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "UNG_999t14e") diff --git a/fireplace/cards/ungoro/druid.py b/fireplace/cards/ungoro/druid.py index f0abf4e02..94d86f3ba 100644 --- a/fireplace/cards/ungoro/druid.py +++ b/fireplace/cards/ungoro/druid.py @@ -48,6 +48,11 @@ class UNG_103: class UNG_108: """Earthen Scales""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Buff(TARGET, "UNG_108e").then(GainArmor(FRIENDLY_HERO, ATK(Buff.TARGET))) diff --git a/fireplace/cards/ungoro/hunter.py b/fireplace/cards/ungoro/hunter.py index b2f88c1b2..bb4146ec4 100644 --- a/fireplace/cards/ungoro/hunter.py +++ b/fireplace/cards/ungoro/hunter.py @@ -73,6 +73,10 @@ class UNG_917: class UNG_917t1: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_TARGET_WITH_RACE: 20, + } activate = Buff(TARGET, "UNG_917e") diff --git a/fireplace/cards/ungoro/neutral_epic.py b/fireplace/cards/ungoro/neutral_epic.py index 9a92e1500..099796ce3 100644 --- a/fireplace/cards/ungoro/neutral_epic.py +++ b/fireplace/cards/ungoro/neutral_epic.py @@ -51,6 +51,10 @@ class UNG_113e: class UNG_847: """Blazecaller""" + requirements = { + PlayReq.REQ_NONSELF_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABE_AND_ELEMENTAL_PLAYED_LAST_TURN: 0, + } play = Hit(TARGET, 5) @@ -61,4 +65,9 @@ class UNG_848: class UNG_946: """Gluttonous Ooze""" + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_WITH_DEATHRATTLE: 0, + } play = Destroy(ENEMY_WEAPON).then(GainArmor(FRIENDLY_HERO, ATK(Destroy.TARGET))) diff --git a/fireplace/cards/ungoro/rogue.py b/fireplace/cards/ungoro/rogue.py index a49bd13ef..9c5ed9d4f 100644 --- a/fireplace/cards/ungoro/rogue.py +++ b/fireplace/cards/ungoro/rogue.py @@ -21,6 +21,10 @@ class UNG_063: class UNG_064: """Vilespine Slayer""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_FOR_COMBO: 0, + } combo = Destroy(TARGET) @@ -51,11 +55,17 @@ class UNG_057: class UNG_057t1: + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 1) class UNG_060: """Mimic Pod""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Draw(CONTROLLER).then(Give(CONTROLLER, Copy(Draw.CARD))) @@ -95,6 +105,9 @@ class UNG_067t1e2: class UNG_823: """Envenom Weapon""" + requirements = { + PlayReq.REQ_WEAPON_EQUIPPED: 0, + } play = SetTag(FRIENDLY_WEAPON, (GameTag.POISONOUS, )) diff --git a/fireplace/cards/ungoro/shaman.py b/fireplace/cards/ungoro/shaman.py index 4bdf98e00..12cd65b14 100644 --- a/fireplace/cards/ungoro/shaman.py +++ b/fireplace/cards/ungoro/shaman.py @@ -16,6 +16,10 @@ class UNG_202: class UNG_208: """Stone Sentinel""" + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_TARGET_WITH_DEATHRATTLE: 0, + } play = ELEMENTAL_PLAYED_LAST_TURN & (SummonBothSides(CONTROLLER, "UNG_208t") * 2) @@ -44,6 +48,9 @@ class UNG_211d: class UNG_938: """Hot Spring Guardian""" + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = Heal(TARGET, 3) @@ -57,6 +64,10 @@ class UNG_025: class UNG_817: """Tidal Surge""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Hit(TARGET, 4), Heal(FRIENDLY_HERO, 4) diff --git a/fireplace/cards/ungoro/warlock.py b/fireplace/cards/ungoro/warlock.py index 956f6551e..b3b0cc8da 100644 --- a/fireplace/cards/ungoro/warlock.py +++ b/fireplace/cards/ungoro/warlock.py @@ -6,6 +6,11 @@ class UNG_047: """Ravenous Pterrordax""" + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = Destroy(TARGET), Adapt(SELF) * 2 @@ -51,6 +56,9 @@ class UNG_829: class UNG_829t1: + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + } play = Summon(CONTROLLER, "UNG_829t2") @@ -79,4 +87,8 @@ class UNG_832e: class UNG_834: """Feeding Time""" + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 3), Summon(CONTROLLER, "UNG_834t1") * 3 diff --git a/fireplace/cards/witchwood/druid.py b/fireplace/cards/witchwood/druid.py index 5f5d3f269..ca63b673a 100644 --- a/fireplace/cards/witchwood/druid.py +++ b/fireplace/cards/witchwood/druid.py @@ -43,6 +43,11 @@ class GIL_658: """Splintergraft""" # [x]Battlecry: Choose a friendly minion. Add a 10/10 copy to your hand that # costs (10). + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Give(CONTROLLER, Buff(Buff(Copy(TARGET), "GIL_658e"), "GBL_007e")) @@ -80,12 +85,19 @@ class GIL_553: class GIL_571: """Witching Hour""" # Summon a random friendly Beast that died this game. + requirements = { + PlayReq.REQ_NUM_MINION_SLOTS: 1, + PlayReq.REQ_FRIENDLY_MINIONS_OF_RACE_DIED_THIS_GAME: 20, + } play = Summon(CONTROLLER, Copy(RANDOM(FRIENDLY + KILLED + BEAST))) class GIL_637: """Ferocious Howl""" # Draw a card. Gain 1 Armor for each card in your hand. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Draw(CONTROLLER), GainArmor(FRIENDLY_HERO, Count(FRIENDLY_HAND)) diff --git a/fireplace/cards/witchwood/hunter.py b/fireplace/cards/witchwood/hunter.py index ee4f4d8d7..0acec49bf 100644 --- a/fireplace/cards/witchwood/hunter.py +++ b/fireplace/cards/witchwood/hunter.py @@ -66,6 +66,10 @@ class GIL_905: class GIL_518: """Wing Blast""" # Deal $4 damage to a minion. If a minion died this turn, this costs (1). + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 4) class Hand: @@ -85,6 +89,11 @@ class GIL_577: class GIL_828: """Dire Frenzy""" # Give a Beast +3/+3. Shuffle 3 copies into your deck with +3/+3. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_WITH_RACE: 20, + } play = Buff(TARGET, "GIL_828e").then( Shuffle(CONTROLLER, ExactCopy(TARGET)) * 3 ) diff --git a/fireplace/cards/witchwood/mage.py b/fireplace/cards/witchwood/mage.py index cafd61d98..76d5b3381 100644 --- a/fireplace/cards/witchwood/mage.py +++ b/fireplace/cards/witchwood/mage.py @@ -78,4 +78,8 @@ class GIL_548: class GIL_801: """Snap Freeze""" # Freeze a minion. If it's already Frozen, destroy it. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Find(TARGET + FROZEN) & Destroy(TARGET) | Freeze(TARGET) diff --git a/fireplace/cards/witchwood/neutral_epic.py b/fireplace/cards/witchwood/neutral_epic.py index 375c2bd39..b279a7159 100644 --- a/fireplace/cards/witchwood/neutral_epic.py +++ b/fireplace/cards/witchwood/neutral_epic.py @@ -25,6 +25,10 @@ class GIL_581: class GIL_614: """Voodoo Doll""" # Battlecry: Choose a minion. Deathrattle: Destroy the chosen minion. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + } deathrattle = HAS_TARGET & Destroy(TARGET) @@ -49,6 +53,11 @@ class GIL_682: class GIL_815: """Baleful Banker""" # Battlecry: Choose a friendly minion. Shuffle a copy into your deck. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Shuffle(CONTROLLER, Copy(TARGET)) diff --git a/fireplace/cards/witchwood/neutral_rare.py b/fireplace/cards/witchwood/neutral_rare.py index cc35f94d6..384049e6d 100644 --- a/fireplace/cards/witchwood/neutral_rare.py +++ b/fireplace/cards/witchwood/neutral_rare.py @@ -7,6 +7,10 @@ class GIL_125: """Mad Hatter""" # [x]Battlecry: Randomly toss 3 hats to other minions. Each hat gives +1/+1. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_WITH_RACE: 11, + } play = Buff(RANDOM_OTHER_MINION, "GIL_125e") * 3 diff --git a/fireplace/cards/witchwood/paladin.py b/fireplace/cards/witchwood/paladin.py index 9b5b3b1b1..d1878fa31 100644 --- a/fireplace/cards/witchwood/paladin.py +++ b/fireplace/cards/witchwood/paladin.py @@ -47,6 +47,10 @@ class GIL_817: class GIL_145: """Sound the Bells!""" # Echo Give a minion +1/+2. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Buff(TARGET, "GIL_145e") diff --git a/fireplace/cards/witchwood/priest.py b/fireplace/cards/witchwood/priest.py index a1b22c73b..77b8badd5 100644 --- a/fireplace/cards/witchwood/priest.py +++ b/fireplace/cards/witchwood/priest.py @@ -46,6 +46,9 @@ class GIL_805: class GIL_835: """Squashling""" # [x]Echo Battlecry: Restore 2 Health. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + } play = Heal(TARGET, 2) @@ -77,16 +80,30 @@ class GIL_840: class GIL_134: """Holy Water""" # Deal $4 damage to a minion. If that kills it, add a copy of it to your_hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 4), Dead(TARGET) & Give(CONTROLLER, Copy(TARGET)) class GIL_661: """Divine Hymn""" # Restore #6 Health to all friendly characters. + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Heal(FRIENDLY_CHARACTERS, 6) class GIL_813: """Vivid Nightmare""" # [x]Choose a friendly minion. Summon a copy of it with 1 Health remaining. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_NUM_MINION_SLOTS: 1, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Summon(CONTROLLER, SetCurrentHealth(ExactCopy(TARGET), 1)) diff --git a/fireplace/cards/witchwood/rogue.py b/fireplace/cards/witchwood/rogue.py index ab097b3ad..47ba09f8a 100644 --- a/fireplace/cards/witchwood/rogue.py +++ b/fireplace/cards/witchwood/rogue.py @@ -53,12 +53,20 @@ class GIL_902: class GIL_506: """Cheap Shot""" # Echo Deal $2 damage to a_minion. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 2) class GIL_687: """WANTED!""" # Deal $3 damage to a minion. If that kills it, add a Coin to your hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 3), Dead(TARGET) & Give(CONTROLLER, THE_COIN) diff --git a/fireplace/cards/witchwood/shaman.py b/fireplace/cards/witchwood/shaman.py index 0389bcad2..d2e662dbf 100644 --- a/fireplace/cards/witchwood/shaman.py +++ b/fireplace/cards/witchwood/shaman.py @@ -7,6 +7,9 @@ class GIL_530: """Murkspark Eel""" # Battlecry: If your deck has only even-Cost cards, deal_2 damage. + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE_AND_ONLY_EVEN_COST_CARD_IN_DECK: 0, + } powered_up = EvenCost(FRIENDLY_DECK) play = powered_up & Hit(TARGET, 2) @@ -47,6 +50,10 @@ class GIL_820: class GIL_586: """Earthen Might""" # [x]Give a minion +2/+2. If it's an Elemental, add a random Elemental to your hand. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = ( Buff(TARGET, "GIL_586e"), Find(TARGET + ELEMENTAL) & Give(CONTROLLER, RandomElemental()) @@ -59,6 +66,10 @@ class GIL_586: class GIL_600: """Zap!""" # Deal $2 damage to a minion. Overload: (1) + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(TARGET, 2) diff --git a/fireplace/cards/witchwood/warlock.py b/fireplace/cards/witchwood/warlock.py index fc79d8511..4d3e06f6c 100644 --- a/fireplace/cards/witchwood/warlock.py +++ b/fireplace/cards/witchwood/warlock.py @@ -15,6 +15,11 @@ class GIL_515: """Ratcatcher""" # Rush Battlecry: Destroy a friendly minion and gain its Attack and # Health. + requirements = { + PlayReq.REQ_FRIENDLY_TARGET: 0, + PlayReq.REQ_MINION_TARGET: 0, + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + } play = ( Buff(SELF, "GIL_515e", atk=ATK(TARGET), max_health=CURRENT_HEALTH(TARGET)), Destroy(TARGET) @@ -73,6 +78,10 @@ class GIL_191: class GIL_543: """Dark Possession""" # Deal $2 damage to a friendly character. Discover a Demon. + requirements = { + PlayReq.REQ_TARGET_TO_PLAY: 0, + PlayReq.REQ_FRIENDLY_TARGET: 0, + } play = Hit(TARGET, 2), DISCOVER(RandomDemon()) diff --git a/fireplace/cards/witchwood/warrior.py b/fireplace/cards/witchwood/warrior.py index 369d2e116..2a533af25 100644 --- a/fireplace/cards/witchwood/warrior.py +++ b/fireplace/cards/witchwood/warrior.py @@ -68,6 +68,9 @@ class GIL_537: class GIL_654: """Warpath""" # Echo Deal $1 damage to all_minions. + requirements = { + PlayReq.REQ_MINION_TARGET: 0, + } play = Hit(ALL_MINIONS, 1) diff --git a/fireplace/cards/wog/rogue.py b/fireplace/cards/wog/rogue.py index e986ea4c7..546f38a26 100644 --- a/fireplace/cards/wog/rogue.py +++ b/fireplace/cards/wog/rogue.py @@ -46,6 +46,10 @@ class OG_291e: class OG_282: + requirements = { + PlayReq.REQ_TARGET_IF_AVAILABLE: 0, + PlayReq.REQ_MINION_TARGET: 0, + } play = ( Buff(CTHUN, "OG_281e", atk=ATK(TARGET), max_health=CURRENT_HEALTH(TARGET)), Destroy(TARGET) diff --git a/tests/generator.py b/tests/generator.py index e014503b1..eb0fb7a27 100755 --- a/tests/generator.py +++ b/tests/generator.py @@ -95,6 +95,11 @@ def single_card(card): description = " ".join(description_lines) for des in textwrap.wrap(description, width=85): str += f"\t# {des}\n" + if card.requirements: + str += "\trequirements = {\n" + for req, value in card.requirements.items(): + str += f"\t\tPlayReq.{req.name}: {value},\n" + str += "\t}\n" str += "\tpass\n" return str diff --git a/tests/requirements_generator.py b/tests/requirements_generator.py new file mode 100644 index 000000000..476969ffa --- /dev/null +++ b/tests/requirements_generator.py @@ -0,0 +1,47 @@ +from importlib import import_module + +from hearthstone.enums import CardType + +from fireplace import cards +from fireplace.utils import CARD_SETS + + +cards.db.initialize() + +for id in cards.db: + card = cards.db[id] + for cardset in CARD_SETS: + module_dir = f"fireplace.cards.{cardset}" + module = import_module(module_dir) + if hasattr(module, id): + carddef = getattr(module, id) + if ( + card.requirements and + not hasattr(carddef, "requirements") and + card.type != CardType.ENCHANTMENT + ): + print(card.name) + + req_lines = [] + req_lines.append("\trequirements = {\n") + for req, value in card.requirements.items(): + req_lines.append(f"\t\tPlayReq.{req.name}: {value},\n") + req_lines.append("\t}\n") + + filepath = carddef.__module__.replace(".", "/") + ".py" + with open(filepath, "r") as f: + lines = f.readlines() + + finded = False + + for i, line in enumerate(lines): + if not finded: + if line.startswith(f"class {id}:") or line.startswith(f"class {id}("): + finded = True + else: + if not line.startswith('\t"') and not line.startswith("\t#"): + lines = lines[:i] + req_lines + lines[i:] + break + + with open(filepath, "w") as f: + f.writelines(lines)