From 26c85fd18a3922feb87fd3cba36b8d097b26a373 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 25 Jul 2016 06:32:49 +0800 Subject: [PATCH 1/8] added Eldritch Moon --- projects/mtg/bin/Res/sets/EMN/_cards.dat | 1171 ++++++++++++++++++++++ 1 file changed, 1171 insertions(+) create mode 100644 projects/mtg/bin/Res/sets/EMN/_cards.dat diff --git a/projects/mtg/bin/Res/sets/EMN/_cards.dat b/projects/mtg/bin/Res/sets/EMN/_cards.dat new file mode 100644 index 000000000..c6efbb6c5 --- /dev/null +++ b/projects/mtg/bin/Res/sets/EMN/_cards.dat @@ -0,0 +1,1171 @@ +[meta] +author=Wagic Team +name=Eldritch Moon +year=2016 +total=223 +[/meta] +[card] +primitive=Abandon Reason +id=414412 +rarity=U +[/card] +[card] +primitive=Abolisher of Bloodlines +id=414408 +rarity=T +[/card] +[card] +primitive=Abundant Maw +id=414290 +rarity=U +[/card] +[card] +primitive=Advanced Stitchwing +id=414341 +rarity=U +[/card] +[card] +primitive=Alchemist's Greeting +id=414413 +rarity=C +[/card] +[card] +primitive=Assembled Alphas +id=414414 +rarity=R +[/card] +[card] +primitive=Aurora of Emrakul +id=414500 +rarity=T +[/card] +[card] +primitive=Backwoods Survivalists +id=414451 +rarity=C +[/card] +[card] +primitive=Bedlam Reveler +id=414415 +rarity=R +[/card] +[card] +primitive=Blessed Alliance +id=414302 +rarity=U +[/card] +[card] +primitive=Blood Mist +id=414416 +rarity=U +[/card] +[card] +primitive=Bloodbriar +id=414452 +rarity=C +[/card] +[card] +primitive=Bloodhall Priest +id=414486 +rarity=R +[/card] +[card] +primitive=Bold Impaler +id=414417 +rarity=C +[/card] +[card] +primitive=Boon of Emrakul +id=414376 +rarity=C +[/card] +[card] +primitive=Borrowed Grace +id=414303 +rarity=C +[/card] +[card] +primitive=Borrowed Hostility +id=414418 +rarity=C +[/card] +[card] +primitive=Borrowed Malevolence +id=414377 +rarity=C +[/card] +[card] +primitive=Brazen Wolves +id=414419 +rarity=C +[/card] +[card] +primitive=Brisela Voice of Nightmares +id=414305 +rarity=T +[/card] +[card] +primitive=Bruna the Fading Light +id=414304 +rarity=R +[/card] +[card] +primitive=Campaign of Vengeance +id=414487 +rarity=U +[/card] +[card] +primitive=Cathar's Shield +id=414498 +rarity=C +[/card] +[card] +primitive=Cemetery Recruitment +id=414378 +rarity=C +[/card] +[card] +primitive=Certain Death +id=414379 +rarity=C +[/card] +[card] +primitive=Chilling Grasp +id=414342 +rarity=U +[/card] +[card] +primitive=Chittering Host +id=414392 +rarity=T +[/card] +[card] +primitive=Choking Restraints +id=414306 +rarity=C +[/card] +[card] +primitive=Clear Shot +id=414453 +rarity=U +[/card] +[card] +primitive=Coax from the Blind Eternities +id=414343 +rarity=R +[/card] +[card] +primitive=Collective Brutality +id=414380 +rarity=R +[/card] +[card] +primitive=Collective Defiance +id=414420 +rarity=R +[/card] +[card] +primitive=Collective Effort +id=414307 +rarity=R +[/card] +[card] +primitive=Conduit of Emrakul +id=414422 +rarity=T +[/card] +[card] +primitive=Conduit of Storms +id=414421 +rarity=U +[/card] +[card] +primitive=Contingency Plan +id=414344 +rarity=C +[/card] +[card] +primitive=Convolute +id=414345 +rarity=C +[/card] +[card] +primitive=Courageous Outrider +id=414308 +rarity=U +[/card] +[card] +primitive=Crop Sigil +id=414454 +rarity=U +[/card] +[card] +primitive=Crossroads Consecrator +id=414455 +rarity=C +[/card] +[card] +primitive=Cryptbreaker +id=414381 +rarity=R +[/card] +[card] +primitive=Cryptolith Fragment +id=414499 +rarity=U +[/card] +[card] +primitive=Cultist's Staff +id=414501 +rarity=C +[/card] +[card] +primitive=Curious Homunculus +id=414346 +rarity=U +[/card] +[card] +primitive=Dark Salvation +id=414382 +rarity=R +[/card] +[card] +primitive=Dawn Gryff +id=414309 +rarity=C +[/card] +[card] +primitive=Decimator of the Provinces +id=414291 +rarity=M +[/card] +[card] +primitive=Deploy the Gatewatch +id=414310 +rarity=M +[/card] +[card] +primitive=Deranged Whelp +id=414423 +rarity=U +[/card] +[card] +primitive=Desperate Sentry +id=414311 +rarity=C +[/card] +[card] +primitive=Displace +id=414348 +rarity=C +[/card] +[card] +primitive=Distemper of the Blood +id=414424 +rarity=C +[/card] +[card] +primitive=Distended Mindbender +id=414292 +rarity=R +[/card] +[card] +primitive=Docent of Perfection +id=414349 +rarity=R +[/card] +[card] +primitive=Drag Under +id=414351 +rarity=C +[/card] +[card] +primitive=Drogskol Shieldmate +id=414312 +rarity=U +[/card] +[card] +primitive=Dronepack Kindred +id=414449 +rarity=T +[/card] +[card] +primitive=Drownyard Behemoth +id=414293 +rarity=U +[/card] +[card] +primitive=Dusk Feaster +id=414383 +rarity=U +[/card] +[card] +primitive=Elder Deep-Fiend +id=414294 +rarity=R +[/card] +[card] +primitive=Eldritch Evolution +id=414456 +rarity=R +[/card] +[card] +primitive=Emrakul's Evangel +id=414457 +rarity=R +[/card] +[card] +primitive=Emrakul's Influence +id=414458 +rarity=U +[/card] +[card] +primitive=Emrakul, the Promised End +id=414295 +rarity=M +[/card] +[card] +primitive=Enlightened Maniac +id=414352 +rarity=C +[/card] +[card] +primitive=Erupting Dreadwolf +id=414442 +rarity=T +[/card] +[card] +primitive=Eternal Scourge +id=414296 +rarity=R +[/card] +[card] +primitive=Extricator of Flesh +id=414314 +rarity=T +[/card] +[card] +primitive=Extricator of Sin +id=414313 +rarity=U +[/card] +[card] +primitive=Exultant Cultist +id=414353 +rarity=C +[/card] +[card] +primitive=Faith Unbroken +id=414315 +rarity=U +[/card] +[card] +primitive=Faithbearer Paladin +id=414316 +rarity=C +[/card] +[card] +primitive=Falkenrath Reaver +id=414425 +rarity=C +[/card] +[card] +primitive=Fibrous Entangler +id=414478 +rarity=T +[/card] +[card] +primitive=Field Creeper +id=414502 +rarity=C +[/card] +[card] +primitive=Fiend Binder +id=414317 +rarity=C +[/card] +[card] +primitive=Final Iteration +id=414350 +rarity=T +[/card] +[card] +primitive=Fogwalker +id=414354 +rarity=C +[/card] +[card] +primitive=Fortune's Favor +id=414355 +rarity=U +[/card] +[card] +primitive=Foul Emissary +id=414459 +rarity=U +[/card] +[card] +primitive=Furyblade Vampire +id=414426 +rarity=U +[/card] +[card] +primitive=Galvanic Bombardment +id=414427 +rarity=C +[/card] +[card] +primitive=Gavony Unhallowed +id=414384 +rarity=C +[/card] +[card] +primitive=Geier Reach Sanitarium +id=414510 +rarity=R +[/card] +[card] +primitive=Geist of the Archives +id=414356 +rarity=U +[/card] +[card] +primitive=Geist of the Lonely Vigil +id=414318 +rarity=U +[/card] +[card] +primitive=Geist-Fueled Scarecrow +id=414503 +rarity=U +[/card] +[card] +primitive=Gisa and Geralf +id=414488 +rarity=M +[/card] +[card] +primitive=Gisela the Broken Blade +id=414319 +rarity=M +[/card] +[card] +primitive=Give No Ground +id=414320 +rarity=U +[/card] +[card] +primitive=Gnarlwood Dryad +id=414460 +rarity=U +[/card] +[card] +primitive=Graf Harvest +id=414385 +rarity=U +[/card] +[card] +primitive=Graf Rats +id=414386 +rarity=C +[/card] +[card] +primitive=Grapple with the Past +id=414461 +rarity=C +[/card] +[card] +primitive=Grim Flayer +id=414489 +rarity=M +[/card] +[card] +primitive=Grisly Anglerfish +id=414358 +rarity=T +[/card] +[card] +primitive=Grizzled Angler +id=414357 +rarity=U +[/card] +[card] +primitive=Guardian of Pilgrims +id=414321 +rarity=C +[/card] +[card] +primitive=Hamlet Captain +id=414462 +rarity=U +[/card] +[card] +primitive=Hanweir Battlements +id=414511 +rarity=R +[/card] +[card] +primitive=Hanweir Garrison +id=414428 +rarity=R +[/card] +[card] +primitive=Hanweir the Writhing Township +id=414429 +rarity=T +[/card] +[card] +primitive=Harmless Offering +id=414430 +rarity=R +[/card] +[card] +primitive=Haunted Dead +id=414387 +rarity=U +[/card] +[card] +primitive=Heron's Grace Champion +id=414490 +rarity=R +[/card] +[card] +primitive=Howling Chorus +id=414471 +rarity=T +[/card] +[card] +primitive=Identity Thief +id=414359 +rarity=R +[/card] +[card] +primitive=Impetuous Devils +id=414431 +rarity=R +[/card] +[card] +primitive=Imprisoned in the Moon +id=414360 +rarity=R +[/card] +[card] +primitive=Incendiary Flow +id=414432 +rarity=U +[/card] +[card] +primitive=Ingenious Skaab +id=414361 +rarity=C +[/card] +[card] +primitive=Insatiable Gorgers +id=414433 +rarity=U +[/card] +[card] +primitive=Ironclad Slayer +id=414322 +rarity=C +[/card] +[card] +primitive=Ironwright's Cleansing +id=414323 +rarity=C +[/card] +[card] +primitive=Ishkanah, Grafwidow +id=414463 +rarity=M +[/card] +[card] +primitive=It That Rides as One +id=414325 +rarity=T +[/card] +[card] +primitive=It of the Horrid Swarm +id=414297 +rarity=C +[/card] +[card] +primitive=Kessig Prowler +id=414464 +rarity=U +[/card] +[card] +primitive=Laboratory Brute +id=414362 +rarity=C +[/card] +[card] +primitive=Lashweed Lurker +id=414298 +rarity=U +[/card] +[card] +primitive=Liliana's Elite +id=414389 +rarity=U +[/card] +[card] +primitive=Liliana, the Last Hope +id=414388 +rarity=M +[/card] +[card] +primitive=Lone Rider +id=414324 +rarity=U +[/card] +[card] +primitive=Long Road Home +id=414326 +rarity=U +[/card] +[card] +primitive=Lunar Force +id=414363 +rarity=U +[/card] +[card] +primitive=Lunarch Mantle +id=414327 +rarity=C +[/card] +[card] +primitive=Lupine Prototype +id=414504 +rarity=R +[/card] +[card] +primitive=Make Mischief +id=414434 +rarity=C +[/card] +[card] +primitive=Markov Crusader +id=414390 +rarity=U +[/card] +[card] +primitive=Mausoleum Wanderer +id=414364 +rarity=R +[/card] +[card] +primitive=Mercurial Geists +id=414491 +rarity=U +[/card] +[card] +primitive=Midnight Scavengers +id=414391 +rarity=C +[/card] +[card] +primitive=Mind's Dilation +id=414365 +rarity=M +[/card] +[card] +primitive=Mirrorwing Dragon +id=414435 +rarity=M +[/card] +[card] +primitive=Mockery of Nature +id=414299 +rarity=U +[/card] +[card] +primitive=Mournwillow +id=414492 +rarity=U +[/card] +[card] +primitive=Murder +id=414393 +rarity=U +[/card] +[card] +primitive=Nahiri's Wrath +id=414436 +rarity=M +[/card] +[card] +primitive=Nebelgast Herald +id=414366 +rarity=U +[/card] +[card] +primitive=Nephalia Academy +id=414512 +rarity=U +[/card] +[card] +primitive=Niblis of Frost +id=414367 +rarity=R +[/card] +[card] +primitive=Noose Constrictor +id=414466 +rarity=U +[/card] +[card] +primitive=Noosegraf Mob +id=414394 +rarity=R +[/card] +[card] +primitive=Oath of Liliana +id=414395 +rarity=R +[/card] +[card] +primitive=Olivia's Dragoon +id=414396 +rarity=C +[/card] +[card] +primitive=Otherworldly Outburst +id=414437 +rarity=C +[/card] +[card] +primitive=Peace of Mind +id=414328 +rarity=U +[/card] +[card] +primitive=Permeating Mass +id=414467 +rarity=R +[/card] +[card] +primitive=Prey Upon +id=414468 +rarity=C +[/card] +[card] +primitive=Primal Druid +id=414469 +rarity=C +[/card] +[card] +primitive=Prophetic Ravings +id=414438 +rarity=C +[/card] +[card] +primitive=Providence +id=414329 +rarity=R +[/card] +[card] +primitive=Prying Questions +id=414397 +rarity=U +[/card] +[card] +primitive=Repel the Abominable +id=414330 +rarity=U +[/card] +[card] +primitive=Ride Down +id=414493 +rarity=U +[/card] +[card] +primitive=Rise from the Grave +id=414398 +rarity=U +[/card] +[card] +primitive=Ruthless Disposal +id=414399 +rarity=U +[/card] +[card] +primitive=Sanctifier of Souls +id=414331 +rarity=R +[/card] +[card] +primitive=Savage Alliance +id=414439 +rarity=U +[/card] +[card] +primitive=Scour the Laboratory +id=414368 +rarity=U +[/card] +[card] +primitive=Selfless Spirit +id=414332 +rarity=R +[/card] +[card] +primitive=Shreds of Sanity +id=414440 +rarity=U +[/card] +[card] +primitive=Shrill Howler +id=414470 +rarity=U +[/card] +[card] +primitive=Sigarda's Aid +id=414333 +rarity=R +[/card] +[card] +primitive=Sigardian Priest +id=414334 +rarity=C +[/card] +[card] +primitive=Sinuous Predator +id=414465 +rarity=T +[/card] +[card] +primitive=Skirsdag Supplicant +id=414400 +rarity=C +[/card] +[card] +primitive=Slayer's Cleaver +id=414505 +rarity=U +[/card] +[card] +primitive=Smoldering Werewolf +id=414441 +rarity=U +[/card] +[card] +primitive=Somberwald Stag +id=414472 +rarity=U +[/card] +[card] +primitive=Soul Separator +id=414506 +rarity=R +[/card] +[card] +primitive=Spectral Reserves +id=414335 +rarity=C +[/card] +[card] +primitive=Spell Queller +id=414494 +rarity=R +[/card] +[card] +primitive=Spirit of the Hunt +id=414473 +rarity=R +[/card] +[card] +primitive=Splendid Reclamation +id=414474 +rarity=R +[/card] +[card] +primitive=Spontaneous Mutation +id=414369 +rarity=C +[/card] +[card] +primitive=Spreading Flames +id=414443 +rarity=U +[/card] +[card] +primitive=Springsage Ritual +id=414475 +rarity=C +[/card] +[card] +primitive=Steadfast Cathar +id=414336 +rarity=C +[/card] +[card] +primitive=Stensia Banquet +id=414444 +rarity=C +[/card] +[card] +primitive=Stensia Innkeeper +id=414445 +rarity=C +[/card] +[card] +primitive=Stitcher's Graft +id=414507 +rarity=R +[/card] +[card] +primitive=Strange Augmentation +id=414401 +rarity=C +[/card] +[card] +primitive=Stromkirk Condemned +id=414402 +rarity=R +[/card] +[card] +primitive=Stromkirk Occultist +id=414446 +rarity=R +[/card] +[card] +primitive=Subjugator Angel +id=414337 +rarity=U +[/card] +[card] +primitive=Succumb to Temptation +id=414403 +rarity=C +[/card] +[card] +primitive=Summary Dismissal +id=414370 +rarity=R +[/card] +[card] +primitive=Swift Spinner +id=414476 +rarity=C +[/card] +[card] +primitive=Take Inventory +id=414371 +rarity=C +[/card] +[card] +primitive=Tamiyo, Field Researcher +id=414495 +rarity=M +[/card] +[card] +primitive=Tangleclaw Werewolf +id=414477 +rarity=U +[/card] +[card] +primitive=Tattered Haunter +id=414372 +rarity=C +[/card] +[card] +primitive=Terrarion +id=414508 +rarity=C +[/card] +[card] +primitive=Thalia's Lancers +id=414339 +rarity=R +[/card] +[card] +primitive=Thalia, Heretic Cathar +id=414338 +rarity=R +[/card] +[card] +primitive=Thermo-Alchemist +id=414447 +rarity=C +[/card] +[card] +primitive=Thirsting Axe +id=414509 +rarity=U +[/card] +[card] +primitive=Thraben Foulbloods +id=414404 +rarity=C +[/card] +[card] +primitive=Thraben Standard Bearer +id=414340 +rarity=C +[/card] +[card] +primitive=Tree of Perdition +id=414405 +rarity=M +[/card] +[card] +primitive=Turn Aside +id=414373 +rarity=C +[/card] +[card] +primitive=Ulrich of the Krallenhorde +id=414496 +rarity=M +[/card] +[card] +primitive=Ulrich, Uncontested Alpha +id=414497 +rarity=T +[/card] +[card] +primitive=Ulvenwald Abomination +id=414480 +rarity=T +[/card] +[card] +primitive=Ulvenwald Captive +id=414479 +rarity=C +[/card] +[card] +primitive=Ulvenwald Observer +id=414481 +rarity=R +[/card] +[card] +primitive=Unsubstantiate +id=414374 +rarity=U +[/card] +[card] +primitive=Vampire Cutthroat +id=414406 +rarity=U +[/card] +[card] +primitive=Vexing Scuttler +id=414300 +rarity=U +[/card] +[card] +primitive=Vildin-Pack Outcast +id=414448 +rarity=C +[/card] +[card] +primitive=Voldaren Pariah +id=414407 +rarity=R +[/card] +[card] +primitive=Voracious Reader +id=414347 +rarity=T +[/card] +[card] +primitive=Wailing Ghoul +id=414409 +rarity=C +[/card] +[card] +primitive=Waxing Moon +id=414482 +rarity=C +[/card] +[card] +primitive=Weaver of Lightning +id=414450 +rarity=U +[/card] +[card] +primitive=Weirded Vampire +id=414410 +rarity=C +[/card] +[card] +primitive=Wharf Infiltrator +id=414375 +rarity=R +[/card] +[card] +primitive=Whispers of Emrakul +id=414411 +rarity=U +[/card] +[card] +primitive=Wolfkin Bond +id=414483 +rarity=C +[/card] +[card] +primitive=Woodcutter's Grit +id=414484 +rarity=C +[/card] +[card] +primitive=Woodland Patrol +id=414485 +rarity=C +[/card] +[card] +primitive=Wretched Gryff +id=414301 +rarity=C +[/card] +[card] +primitive=Zombie +id=414513 +rarity=T +[/card] +[card] +primitive=Eldrazi Horror +id=414514 +rarity=T +[/card] +[card] +primitive=Human +id=414515 +rarity=T +[/card] +[card] +primitive=Human +id=414516 +rarity=T +[/card] +[card] +primitive=Spirit +id=414517 +rarity=T +[/card] +[card] +primitive=Spider +id=414518 +rarity=T +[/card] +[card] +primitive=Insect +id=414519 +rarity=T +[/card] +[card] +primitive=Devil +id=414520 +rarity=T +[/card] +[card] +primitive=Human Soldier +id=414521 +rarity=T +[/card] +[card] +primitive=Wolf +id=414522 +rarity=T +[/card] From cc5d8940bfbaa820b34d7e247a99f9000edb41cf Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 26 Jul 2016 07:43:13 +0800 Subject: [PATCH 2/8] Clue tokens --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 99 ++++++++++---------- 1 file changed, 47 insertions(+), 52 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index d5c1149b3..aa3248ec3 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -9141,7 +9141,7 @@ toughness=2 [card] name=Bearer of Overwhelming Truths auto=@movedto(*[-creature|mystack):1/1 ueot -auto=@combatdamaged(player) from(this):token(-410067) controller +auto=@combatdamaged(player) from(this):token(Clue) controller text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever Bearer of Overwhelming Truths deals combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") type=Creature subtype=Human Wizard @@ -14804,7 +14804,7 @@ type=Instant [card] name=Bygone Bishop abilities=flying -auto=@movedto(creature[manacost<=3]|mystack):token(-410067) controller +auto=@movedto(creature[manacost<=3]|mystack):token(Clue) controller text=Flying -- Whenever you cast a creature spell with converted mana cost 3 or less, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{W} type=Creature @@ -14814,7 +14814,7 @@ toughness=3 [/card] [card] name=Byway Courier -auto=@movedTo(this|graveyard) from(battlefield):token(-410067) controller +auto=@movedTo(this|graveyard) from(battlefield):token(Clue) controller text=When Byway Courier dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{G} type=Creature @@ -20245,7 +20245,7 @@ toughness=1 name=Confirm Suspicions target=*|mystack auto=fizzle -auto=token(-410067)*3 controller +auto=token(Clue)*3 controller text=Counter target spell. -- Investigate three times. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{U}{U} type=Instant @@ -20262,7 +20262,7 @@ subtype=Aura [card] name=Confront the Unknown target=creature -auto=token(-410067) controller +auto=token(Clue) controller auto=foreach(clue|mybattlefield) 1/1 text=Investigate, then target creature gets +1/+1 until end of turn for each Clue you control. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={G} @@ -25402,7 +25402,7 @@ type=Artifact [card] name=Declaration in Stone target=creature -auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[@movedto(exile) all([share!name!])token(-410067) controller])) +auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[@movedto(exile) all([share!name!])token(Clue) controller])) text=Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way. mana={1}{W} type=Sorcery @@ -28807,7 +28807,7 @@ toughness=7 [card] name=Dragonlord Kolaghan abilities=flying,haste -auto=lord(other creature|mybattlefield) haste +auto=emblem transforms((,newability[aslongas(Dragonlord Kolaghan|mybattlefield) lord(creature|mybattlefield) haste >0])) ueot auto=@movedto(*[creature;planeswalker]|opponentstack):all(trigger[to]) transforms((,newability[if type(*[share!name!]|mygraveyard)~morethan~0 then life:-10 controller])) oneshot text=Flying, haste -- Other creatures you control have haste. -- Whenever an opponent casts a creature or planeswalker spell with the same name as a card in his or her graveyard, that player loses 10 life. mana={4}{B}{R} @@ -30017,7 +30017,7 @@ toughness=3 [/card] [card] name=Drownyard Explorers -auto=token(-410067) controller +auto=token(Clue) controller text=When Drownyard Explorers enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{U} type=Creature @@ -31863,7 +31863,7 @@ subtype=Aura [/card] [card] name=Elephant Resurgence -auto=token(-21382) controller && token(-21382) opponent +auto=token(Elephant T1) controller && token(Elephant T1) opponent text=Each player puts a green Elephant creature token onto the battlefield. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard." mana={1}{G} type=Sorcery @@ -33829,7 +33829,7 @@ type=Legendary Enchantment [card] name=Erdwal Illuminator abilities=flying -auto=@movedto(clue|mybattlefield) restriction{type(clue[fresh]|mybattlefield)~equalto~1}:token(-410067) +auto=@movedto(clue|mybattlefield) restriction{type(clue[fresh]|mybattlefield)~equalto~1}:token(Clue) text=Flying -- Whenever you investigate for the first time each turn, investigate an additional time. mana={1}{U} type=Creature @@ -35057,7 +35057,7 @@ type=Sorcery name=Expose Evil target=creature auto=tap -auto=token(-410067) controller +auto=token(Clue) controller text=Tap up to two target creatures. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{W} type=Instant @@ -38406,7 +38406,7 @@ toughness=1 [/card] [card] name=Fleeting Memories -auto=token(-410067) controller +auto=token(Clue) controller auto=@movedto(clue|mygraveyard):deplete:3 opponent text=When Fleeting Memories enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, target player puts the top three cards of his or her library into his or her graveyard. mana={2}{U} @@ -45167,7 +45167,7 @@ toughness=6 name=Gone Missing target=* auto=moveto(ownerlibrary) -auto=token(-410067) controller +auto=token(Clue) controller text=Put target permanent on top of its owner's library. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{U} type=Sorcery @@ -51674,7 +51674,7 @@ toughness=1 name=Humble the Brute target=creature[power>3] auto=destroy -auto=token(-410067) controller +auto=token(Clue) controller text=Destroy target creature with power 4 or greater. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{W} type=Instant @@ -54989,7 +54989,7 @@ toughness=1 name=Jace's Scrutiny target=creature auto=-4/-0 -auto=token(-410067) controller +auto=token(Clue) controller text=Target creature gets -4/-0 until end of turn. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} type=Instant @@ -64535,7 +64535,7 @@ type=Instant [card] name=Magnifying Glass auto={T}:Add{1} -auto={4}{T}:token(-410067) controller +auto={4}{T}:token(Clue) controller text={T}: Add {1} to your mana pool. -- {4}, {T}: Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3} type=Artifact @@ -76074,8 +76074,8 @@ toughness=3 [/card] [card] name=Ongoing Investigation -auto=@combatdamaged(player):token(-410067) controller -auto={1}{G}{e(creature|mygraveyard)}:token(-410067) controller && life:2 +auto=@combatdamaged(player):token(Clue) controller +auto={1}{G}{e(creature|mygraveyard)}:token(Clue) controller && life:2 text=Whenever one or more creatures you control deal combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {1}{G}, Exile a creature card from your graveyard: Investigate. You gain 2 life. mana={1}{U} type=Enchantment @@ -81634,7 +81634,7 @@ type=Sorcery name=Press for Answers target=creature auto=frozen -auto=token(-410067) controller +auto=token(Clue) controller text=Tap target creature. It doesn't untap during its controller's next untap step. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} type=Sorcery @@ -89329,7 +89329,7 @@ type=Enchantment name=Root Out target=artifact,enchantment auto=destroy -auto=token(-410067) controller +auto=token(Clue) controller text=Destroy target artifact or enchantment. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{G} type=Sorcery @@ -91838,16 +91838,11 @@ type=Instant [/card] [card] name=Sarpadian Empires, Vol. VII -auto=choice name(white citizen) counter(0/0,1,White Citizen) all(this) -auto=choice name(blue camarid) counter(0/0,1,Blue Camarid) all(this) -auto=choice name(black thrull) counter(0/0,1,Black Thrull) all(this) -auto=choice name(red goblin) counter(0/0,1,Red Goblin) all(this) -auto=choice name(green saproling) counter(0/0,1,Green Saproling) all(this) -auto=this(counter{0/0.1.White Citizen}) {3}{T}:token(-11492111) -auto=this(counter{0/0.1.Blue Camarid}) {3}{T}:token(-11492112) -auto=this(counter{0/0.1.Black Thrull}) {3}{T}:token(-11492113) -auto=this(counter{0/0.1.Red Goblin}) {3}{T}:token(-11492114) -auto=this(counter{0/0.1.Green Saproling}) {3}{T}:token(-11492115) +auto=choice name(white citizen) transforms((,newability[{3}{T}:token(-11492111)])) forever +auto=choice name(blue camarid) transforms((,newability[{3}{T}:token(-11492112)])) forever +auto=choice name(black thrull) transforms((,newability[{3}{T}:token(-11492113)])) forever +auto=choice name(red goblin) transforms((,newability[{3}{T}:token(-11492114)])) forever +auto=choice name(green saproling) transforms((,newability[{3}{T}:token(-11492115)])) forever text=As Sarpadian Empires, Vol. VII enters the battlefield, choose white Citizen, blue Camarid, black Thrull, red Goblin, or green Saproling. -- {3}, {T}: Put a 1/1 creature token of the chosen color and type onto the battlefield. mana={3} type=Artifact @@ -107845,7 +107840,7 @@ name=Survive the Night target=creature auto=1/0 auto=indestructible -auto=token(-410067) controller +auto=token(Clue) controller text=Target creature gets +1/+0 and gains indestructible until end of turn. (Damage and effects that say "destroy" don't destroy it.) -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{W} type=Instant @@ -109252,7 +109247,7 @@ subtype=Tamiyo [/card] [card] name=Tamiyo's Journal -auto=@upkeep:token(-410067) +auto=@upkeep:token(Clue) auto={T}{S(clue|mybattlefield)}{S(clue|mybattlefield)}{S(clue|mybattlefield)}: moveto(myhand) target(*|mylibrary) text=at the beginning of your upkeep, investigate -- {T}, sacrifice three clues: search your library for a card and put that card into your hand, then shuffle your library mana={5} @@ -110472,7 +110467,7 @@ subtype=Arcane [/card] [card] name=Terastodon -auto=may name(destroy) target(*[-creature]|battlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):token(-197137)],newability[destroy])) +auto=may name(destroy) target(*[-creature]|battlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):token(Elephant Token)],newability[destroy])) text=When Terastodon enters the battlefield, you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller puts a 3/3 green Elephant creature token onto the battlefield. mana={6}{G}{G} type=Creature @@ -110713,7 +110708,7 @@ toughness=1 name=Tetravus abilities=flying auto=counter(1/1,3) -auto={c(1/1,-1)}:token(-2073) myupkeeponly +auto={c(1/1,-1)}:token(Tetravite) myupkeeponly auto={e(Tetravite|myBattlefield)}:counter(1/1,1) myupkeeponly text=Flying -- Tetravus enters the battlefield with three +1/+1 counters on it. -- At the beginning of your upkeep, you may remove any number of +1/+1 counters from Tetravus. If you do, put that many 1/1 colorless Tetravite artifact creature tokens onto the battlefield. They each have flying and "This creature can't be enchanted." -- At the beginning of your upkeep, you may exile any number of tokens put onto the battlefield with Tetravus. If you do, put that many +1/+1 counters on Tetravus. mana={6} @@ -111903,7 +111898,7 @@ toughness=2 [/card] [card] name=Thraben Inspector -auto=token(-410067) controller +auto=token(Clue) controller text=When Thraben Inspector enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={W} type=Creature @@ -113129,7 +113124,7 @@ toughness=3 [/card] [card] name=Tireless Tracker -auto=@movedto(land|mybattlefield):token(-410067) controller +auto=@movedto(land|mybattlefield):token(Clue) controller auto=@sacrificed(clue|mybattlefield):(counter(1/1,1) text=Whenever a land enters the battlefield under your control, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker. mana={2}{G} @@ -114229,7 +114224,7 @@ type=Instant [/card] [card] name=Trail of Evidence -auto=@movedto(instant,sorcery|mystack):token(-410067) controller +auto=@movedto(instant,sorcery|mystack):token(Clue) controller text=Whenever you cast an instant or sorcery spell, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{U} type=Enchantment @@ -115273,7 +115268,7 @@ toughness=1 name=Triskelavus abilities=flying auto=counter(1/1,3) -auto={1}{C(1/1,-1)}:token(-114919) +auto={1}{C(1/1,-1)}:token(Triskelavite Token) text=Flying -- Triskelavus enters the battlefield with three +1/+1 counters on it. -- {1}, Remove a +1/+1 counter from Triskelavus: Put a 1/1 colorless Triskelavite artifact creature token with flying onto the battlefield. It has "Sacrifice this creature: This creature deals 1 damage to target creature or player." mana={7} type=Artifact Creature @@ -115496,9 +115491,9 @@ type=Instant [/card] [card] name=Trostani's Summoner -auto=token(-19784611) -auto=token(-19784612) -auto=token(-19784613) +auto=token(Trostani Knight) +auto=token(Trostani Centaur) +auto=token(Trostani Rhino) text=When Trostani's Summoner enters the battlefield, put a 2/2 white Knight creature token with vigilance, a 3/3 green Centaur creature token,and a 4/4 green Rhino creature token with trample onto the battlefield. mana={5}{G}{W} type=Creature @@ -116362,7 +116357,7 @@ toughness=* [/card] [card] name=Ulvenwald Mysteries -auto=@movedto(creature[-token]|mygraveyard):token(-410067) controller +auto=@movedto(creature[-token]|mygraveyard):token(Clue) controller auto=@sacrificed(clue|mybattlefield):token(Human Soldier,creature Human Soldier,1/1,white) text=Whenever a nontoken creature you control dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a 1/1 white Human Soldier creature token onto the battlefield. mana={2}{G} @@ -118260,7 +118255,7 @@ toughness=2 name=Varchild's War-Riders abilities=trample auto=rampage(1/1,1) -auto=@each my upkeep:counter(0/0,1,Age) && all(this) transforms((,newability[choice sacrifice],newability[choice thisforeach(counter{0/0.1.Age}) token(-3187) opponent])) +auto=@each my upkeep:counter(0/0,1,Age) && all(this) transforms((,newability[choice sacrifice],newability[choice thisforeach(counter{0/0.1.Age}) token(Survivor Token) opponent])) text=Cumulative upkeep - Put a 1/1 red Survivor creature token onto the battlefield under an opponent's control. (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- Trample; rampage 1 (Whenever this creature becomes blocked, it gets +1/+1 until end of turn for each creature blocking it beyond the first.) mana={1}{R} type=Creature @@ -120654,8 +120649,8 @@ toughness=2 [/card] [card] name=Voice of Resurgence -auto=@movedTo(*|opponentstack) restriction{myturnonly}:token(-19784555) -auto=@movedTo(this|graveyard) from(battlefield):token(-19784555) +auto=@movedTo(*|opponentstack) restriction{myturnonly}:token(Elemental) +auto=@movedTo(this|graveyard) from(battlefield):token(Elemental) text=Whenever an opponent casts a spell during your turn, or whenever Voice of Resurgence dies, put a green and white Elemental creature token onto the battlefield with "This creature's power and toughness are each equal to the number of creatures you control." mana={G}{W} type=Creature @@ -121286,7 +121281,7 @@ name=Vraska the Unseen auto=counter(0/0,5,loyalty) auto={C(0/0,1,Loyalty)}:name(+1: dread) transforms((,newability[@combatdamaged(this) from(creature):all(trigger[from]) destroy])) uynt auto={C(0/0,-3,Loyalty)}:name(-3: destroy) destroy target(*[-land]) -auto={C(0/0,-7,Loyalty)}:name(-7: assassin) token(-290538)*3 +auto={C(0/0,-7,Loyalty)}:name(-7: assassin) token(Assassin Token)*3 text=+1: Until your next turn, whenever a creature deals combat damage to Vraska the Unseen, destroy that creature. -- -3: Destroy target nonland permanent. -- -7: Put three 1/1 black Assassin creature tokens onto the battlefield with "Whenever this creature deals combat damage to a player, that player loses the game." mana={3}{B}{G} type=Planeswalker @@ -122184,8 +122179,8 @@ type=Artifact [/card] [card] name=Wand of the Elements -auto={T}{S(island|myBattlefield)}:token(-4977511) -auto={T}{S(mountain|myBattlefield)}:token(-4977512) +auto={T}{S(island|myBattlefield)}:token(Elemental T1) +auto={T}{S(mountain|myBattlefield)}:token(Elemental T2) text={T}, Sacrifice an Island: Put a 2/2 blue Elemental creature token with flying onto the battlefield. -- {T}, Sacrifice a Mountain: Put a 3/3 red Elemental creature token onto the battlefield. mana={4} type=Artifact @@ -123416,7 +123411,7 @@ toughness=1 [/card] [card] name=Weirding Wood -auto=token(-410067) controller +auto=token(Clue) controller auto=teach(land) {T}:add{G}{G} auto=teach(land) {T}:add{W}{W} auto=teach(land) {T}:add{U}{U} @@ -126286,7 +126281,7 @@ type=Sorcery [card] name=Wurmcoil Engine abilities=lifelink,deathtouch -auto=@movedTo(this|graveyard) from(battlefield):token(-20787511) && token(-20787512) +auto=@movedTo(this|graveyard) from(battlefield):token(Wurm T1) && token(Wurm T2) text=Deathtouch, Lifelink -- When Wurmcoil Engine dies, put a 3/3 colorless Wurm artifact creature token with deathtouch and a 3/3 colorless Wurm artifact creature token with lifelink onto the battlefield. mana={6} type=Artifact Creature @@ -126394,8 +126389,8 @@ color=black [/card] [card] name=Xathrid Necromancer -autograveyard=@movedTo(this|graveyard) from(mybattlefield):token(-370619) controller -auto=@movedTo(other human|graveyard) from(mybattlefield):token(-370619) controller +autograveyard=@movedTo(this|graveyard) from(mybattlefield):token(Xathrid Necromancer Zombie) controller +auto=@movedTo(other human|graveyard) from(mybattlefield):token(Xathrid Necromancer Zombie) controller text=Whenever Xathrid Necromancer or another Human creature you control dies, put a 2/2 black Zombie creature token onto the battlefield tapped. mana={2}{B} type=Creature From 43fd399d10aa07edd066d3a54294a348b37acba1 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 26 Jul 2016 07:46:18 +0800 Subject: [PATCH 3/8] Update _tests.txt --- projects/mtg/bin/Res/test/_tests.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index dc83fac83..bb14f8a79 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -463,6 +463,7 @@ living_lands.txt livingweapon.txt lord_of_the_pit.txt lord_of_the_pit2.txt +Living_Death.txt magma_spray.txt manabarbs_dual_lands_i562.txt master_decoy.txt From 12b80307a795945e268f58a5151f66507cc89816 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 26 Jul 2016 08:51:46 +0800 Subject: [PATCH 4/8] Update Living_Death.txt Use Living Death and Clone --- projects/mtg/bin/Res/test/Living_Death.txt | 41 ++++++---------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/projects/mtg/bin/Res/test/Living_Death.txt b/projects/mtg/bin/Res/test/Living_Death.txt index 4f89aebd3..3b9e017e0 100644 --- a/projects/mtg/bin/Res/test/Living_Death.txt +++ b/projects/mtg/bin/Res/test/Living_Death.txt @@ -1,43 +1,22 @@ #Bug: Haste from legendary lords [INIT] -UNTAP +FIRSTMAIN [PLAYER1] -inplay:Worry Beads,swamp,forest,plains -graveyard:99, Dragonlord Kolaghan -library:Krosan Cloudscraper -hand:5556,Dark Ritual,651,Animate Dead,Exhume -manapool:{2}{B}{B}{G} +graveyard:Krosan Cloudscraper, Dragonlord Kolaghan, Clone +hand:Living Death +manapool:{2}{B}{B}{B} [PLAYER2] [DO] -next -#upkeep -next -#draw -next -#firstmain -swamp -forest -plains -Dark Ritual -651 -Animate Dead -Krosan Cloudscraper -5556 -choice 0 -Dragonlord Kolaghan -5556 -choice 0 -99 +Living Death choice 0 Dragonlord Kolaghan choice 0 -next #begins next #attack -Krosan Cloudscraper -99 next +Clone +Krosan Cloudscraper #block next #damage @@ -47,8 +26,8 @@ eot [ASSERT] UNTAP [PLAYER1] -inplay:99, Krosan Cloudscraper, Worry Beads,swamp,forest,plains,Animate Dead -graveyard:Dragonlord Kolaghan, Exhume, Dark Ritual, 651, 5556 +inplay:Krosan Cloudscraper, Clone +graveyard:Dragonlord Kolaghan, Living Death [PLAYER2] -life:2 +life:1 [END] From ae33977e10a2800df7148d37692993d55673724a Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 26 Jul 2016 09:56:13 +0800 Subject: [PATCH 5/8] Add Snapcaster Mage Ability tempflashback - flashback using manacost --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 28 +++++++++++ .../bin/Res/sets/primitives/unsupported.txt | 21 -------- projects/mtg/include/MTGAbility.h | 1 + projects/mtg/include/MTGDefinitions.h | 3 +- projects/mtg/include/MTGRules.h | 15 ++++++ projects/mtg/src/MTGAbility.cpp | 1 + projects/mtg/src/MTGDefinitions.cpp | 3 +- projects/mtg/src/MTGRules.cpp | 49 +++++++++++++++++++ 8 files changed, 98 insertions(+), 23 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index aa3248ec3..9ad6cc6e3 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -78212,6 +78212,14 @@ mana={X}{X}{U} type=Sorcery [/card] [card] +name=Past in Flames +auto=all(instant,sorcery|mygraveyard) tempflashback ueot +flashback={4}{R} +text=Each instant and sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. -- Flashback {4}{R} (You may cast this card from your graveyard for its flashback cost. Then exile it.) +mana={3}{R} +type=Sorcery +[/card] +[card] name=Patagia Golem auto={3}:flying text={3}: Patagia Golem gains flying until end of turn. @@ -86217,6 +86225,15 @@ mana={2}{B} type=Sorcery [/card] [card] +name=Recoup +target=sorcery|mygraveyard +auto=transforms((,newability[tempflashback])) ueot +flashback={3}{R} +text=Target sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. (Mana cost includes color.) -- Flashback {3}{R} (You may cast this card from your graveyard for its flashback cost. Then exile it.) +mana={1}{R} +type=Sorcery +[/card] +[card] name=Recumbent Bliss target=creature auto=cantattack @@ -100590,6 +100607,17 @@ mana={1}{U} type=Instant [/card] [card] +name=Snapcaster Mage +abilities=flash +auto=target(instant,sorcery|mygraveyard) tempflashback ueot +text=Flash -- When Snapcaster Mage enters the battlefield, target instant or sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. (You may cast that card from your graveyard for its flashback cost. Then exile it.) +mana={1}{U} +type=Creature +subtype=Human Wizard +power=2 +toughness=1 +[/card] +[card] name=Snap target=creature auto=moveTo(ownerhand) diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index b96327d74..dd2476efd 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -12447,12 +12447,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Past in Flames -text=Each instant and sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. -- Flashback {4}{R} (You may cast this card from your graveyard for its flashback cost. Then exile it.) -mana={3}{R} -type=Sorcery -[/card] -[card] name=Pathbreaker Ibex text=Whenever Pathbreaker Ibex attacks, creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control. mana={4}{G}{G} @@ -13846,12 +13840,6 @@ mana={2}{G}{W} type=Enchantment [/card] [card] -name=Recoup -text=Target sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. (Mana cost includes color.) -- Flashback {3}{R} (You may cast this card from your graveyard for its flashback cost. Then exile it.) -mana={1}{R} -type=Sorcery -[/card] -[card] name=Recross the Paths text=Reveal cards from the top of your library until you reveal a land card. Put that card onto the battlefield and the rest on the bottom of your library in any order. Clash with an opponent. If you win, return Recross the Paths to its owner's hand. (Each clashing player reveals the top card of his or her library, then puts that card on the top or bottom. A player wins if his or her card had a higher converted mana cost.) mana={2}{G} @@ -16092,15 +16080,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Snapcaster Mage -text=Flash -- When Snapcaster Mage enters the battlefield, target instant or sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost. (You may cast that card from your graveyard for its flashback cost. Then exile it.) -mana={1}{U} -type=Creature -subtype=Human Wizard -power=2 -toughness=1 -[/card] -[card] name=Snow Mercy text=Whenever a creature deals damage to you, put a globe counter on it. -- {T}, {untap}, {T}, {untap}, {T}: Tap all creatures with globe counters on them. mana={2}{W}{W} diff --git a/projects/mtg/include/MTGAbility.h b/projects/mtg/include/MTGAbility.h index 752c5341e..1211405b6 100644 --- a/projects/mtg/include/MTGAbility.h +++ b/projects/mtg/include/MTGAbility.h @@ -219,6 +219,7 @@ public: BESTOW_COST = 35, ATTACK_COST = 36, BLOCK_COST = 37, + GRANTEDFLASHBACK_COST = 38, }; }; diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index b72b67f08..c7db25290 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -255,7 +255,8 @@ class Constants OVERLOAD = 133, SHACKLER = 134, FLYERSONLY = 135,//can attack only if it has flying - NB_BASIC_ABILITIES = 136, + TEMPFLASHBACK = 136, + NB_BASIC_ABILITIES = 137, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/include/MTGRules.h b/projects/mtg/include/MTGRules.h index 1b52f72e3..92eacfc07 100644 --- a/projects/mtg/include/MTGRules.h +++ b/projects/mtg/include/MTGRules.h @@ -150,6 +150,21 @@ public: virtual MTGFlashBackRule * clone() const; }; +class MTGTempFlashBackRule: public MTGAlternativeCostRule +{ +public: + + int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL); + int reactToClick(MTGCardInstance * card); + virtual ostream& toString(ostream& out) const; + MTGTempFlashBackRule(GameObserver* observer, int _id); + const string getMenuText() + { + return "Flashback Manacost"; + } + virtual MTGTempFlashBackRule * clone() const; +}; + class MTGRetraceRule: public MTGAlternativeCostRule { public: diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index f354162a1..27b113a2b 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1176,6 +1176,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG if(found != string::npos) { observer->addObserver(NEW MTGFlashBackRule(observer, -1)); + observer->addObserver(NEW MTGTempFlashBackRule(observer, -1)); return NULL; } //alternative cost type flashback diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 5d40a9513..2d73f2708 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -166,7 +166,8 @@ const char* Constants::MTGBasicAbilities[] = { "dethrone", "overload", "shackler", - "flyersonly" + "flyersonly", + "tempflashback" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 6793a2ac1..befb63824 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -1056,6 +1056,55 @@ MTGFlashBackRule * MTGFlashBackRule::clone() const return NEW MTGFlashBackRule(*this); } +//temporary flashback +MTGTempFlashBackRule::MTGTempFlashBackRule(GameObserver* observer, int _id) : +MTGAlternativeCostRule(observer, _id) +{ + aType = MTGAbility::GRANTEDFLASHBACK_COST; +} +int MTGTempFlashBackRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) +{ + Player * player = game->currentlyActing(); + if (!player->game->graveyard->hasCard(card)) + return 0; + if (!card->has(Constants::TEMPFLASHBACK)) + return 0; + ManaCost * flashbackCost = card->getManaCost(); + if(flashbackCost->extraCosts) + for(unsigned int i = 0; i < flashbackCost->extraCosts->costs.size();i++) + { + flashbackCost->extraCosts->costs[i]->setSource(card); + } + return MTGAlternativeCostRule::isReactingToClick(card, mana, flashbackCost ); +} + +int MTGTempFlashBackRule::reactToClick(MTGCardInstance * card) +{ + ManaCost * flashbackCost = card->getManaCost(); + if(flashbackCost->extraCosts) + for(unsigned int i = 0; i < flashbackCost->extraCosts->costs.size();i++) + { + flashbackCost->extraCosts->costs[i]->setSource(card); + } + if (!isReactingToClick(card)) + return 0; + + card->paymenttype = MTGAbility::FLASHBACK_COST; + + return MTGAlternativeCostRule::reactToClick(card, flashbackCost, ManaCost::MANA_PAID_WITH_FLASHBACK); + +} + +ostream& MTGTempFlashBackRule::toString(ostream& out) const +{ + out << "MTGTempFlashBackRule ::: ("; + return MTGAbility::toString(out) << ")"; +} +MTGTempFlashBackRule * MTGTempFlashBackRule::clone() const +{ + return NEW MTGTempFlashBackRule(*this); +} + //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- From e855ca72aa80741ca3ec215980d28a77bfb60d20 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 27 Jul 2016 01:44:18 +0800 Subject: [PATCH 6/8] Fix Mirror Gallery & enters "tapped" cards If Mirror Gallery leaves play, you must check for legendary status. Fix some cards that enters tapped. --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 188 +++++++++---------- projects/mtg/include/GameObserver.h | 2 + projects/mtg/src/GameObserver.cpp | 45 ++++- projects/mtg/src/MTGRules.cpp | 2 +- 4 files changed, 141 insertions(+), 96 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 9ad6cc6e3..383e7190b 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -3766,7 +3766,7 @@ subtype=Aura [/card] [card] name=Animist's Awakening -auto=if type(*[instant;sorcery]|mygraveyard)~lessthan~2 then reveal:x optionone all(land|reveal) moveto(mybattlefield) and!(tap)! optiononeend optiontwo name(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshotoptiontwoend revealend +auto=if type(*[instant;sorcery]|mygraveyard)~lessthan~2 then reveal:x optionone all(land|reveal) moveto(mybattlefield) and!(tap(noevent))! optiononeend optiontwo name(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshotoptiontwoend revealend auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then reveal:x optionone all(land|reveal) moveto(mybattlefield) optiononeend optiontwo nname(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshot optiontwoend revealendd text=Reveal the top X cards of your library. Put all land cards from among them onto the battlefield tapped and the rest on the bottom of your library in a random order. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, untap those lands. mana={X}{G} @@ -8131,7 +8131,7 @@ type=Instant [card] name=Bant Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(forest,plains,island|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(forest,plains,island|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Bant Panorama: Search your library for a basic Forest, Plains, or Island card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -10671,7 +10671,7 @@ type=Land [card] name=Blighted Woodland auto={T}:add{1} -auto={3}{G}{T}{S}:moveto(mybattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto={3}{G}{T}{S}:moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) text={T}: Add {1} to your mana pool. -- {3}{G}, {T}, Sacrifice Blighted Woodland: Search your library for up to two basic land cards and put them onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -10747,7 +10747,7 @@ toughness=3 [card] name=Blind Obedience auto=@movedto(*|mystack):pay({WB}) life:-1 opponent && life:1 controller -auto=@movedTo(creature,artifact|opponentBattlefield):all(trigger) tap +auto=lord(artifact,creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Extort (Whenever you cast a spell, you may pay {WB}. If you do, each opponent loses 1 life and you gain that much life.) -- Artifacts and creatures your opponents control enter the battlefield tapped. mana={1}{W} type=Enchantment @@ -12215,7 +12215,7 @@ toughness=4 [/card] [card] name=Bogbrew Witch -auto={2}{T}:moveTo(myBattlefield) and!(tap)! target(Festering Newt,Bubbling Cauldron|mylibrary) +auto={2}{T}:moveTo(myBattlefield) and!(tap(noevent))! target(Festering Newt,Bubbling Cauldron|mylibrary) text={2}{T}: Search your library for a card named Festering Newt or Bubbling Cauldron, put it onto the battlefield tapped, then shuffle your library. mana={3}{B} type=Creature @@ -13114,7 +13114,7 @@ toughness=3 [/card] [card] name=Boundless Realms -auto=moveTo(mybattlefield) and!(tap)! notatarget(land|mylibrary) +auto=moveTo(mybattlefield) and!(tap(noevent))! notatarget(land|mylibrary) text=Search your library for up to X basic land cards, where X is the number of lands you control, and put them onto the battlefield tapped. Then shuffle your library. mana={6}{G} type=Sorcery @@ -14635,7 +14635,7 @@ toughness=2 [/card] [card] name=Burnished Hart -auto={3}{S}:notatarget(land[basic]|mylibrary) and!(tap)! moveTo(mybattlefield) +auto={3}{S}:notatarget(land[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) text={3},Sacrifice Burnished Hart: Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. mana={3} type=Artifact Creature @@ -16787,7 +16787,7 @@ toughness=3 [/card] [card] name=Centaur Rootcaster -auto=@combatdamaged(player) from(this):may moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=@combatdamaged(player) from(this):may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=Whenever Centaur Rootcaster deals combat damage to a player, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. mana={3}{G} type=Creature @@ -18289,7 +18289,7 @@ toughness=1 [/card] [card] name=Chronosavant -autograveyard={1}{W}:turns:-1 controller && moveTo(mybattlefield) and!(tap)! +autograveyard={1}{W}:turns:-1 controller && moveTo(mybattlefield) and!(tap(noevent))! text={1}{W}: Return Chronosavant from your graveyard to the battlefield tapped. You skip your next turn. mana={5}{W} type=Creature @@ -22885,7 +22885,7 @@ toughness=3 [/card] [card] name=Cultivate -auto=name(fetch to play) notatarget(land[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(land[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap)!])) oneshot +auto=name(fetch to play) notatarget(land[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(land[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot text=Search your library for up to two basic land cards, reveal those cards, and put one onto the battlefield tapped and the other in your hand. Then shuffle your library. mana={2}{G} type=Sorcery @@ -24573,7 +24573,7 @@ toughness=4 [/card] [card] name=Dawntreader Elk -auto={G}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) && shuffle +auto={G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) && shuffle text={G}, Sacrifice Dawntrader Elk: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. mana={1}{G} type=Creature @@ -25503,7 +25503,7 @@ type=Sorcery [/card] [card] name=Deep Reconnaissance -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) flashback={4}{G} text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- Flashback {4}{G} (You may cast this card from your graveyard for its flashback cost. Then exile it.) mana={2}{G} @@ -27121,7 +27121,7 @@ type=Instant [/card] [card] name=Diligent Farmhand -auto={1}{G}{S}:moveTo(myBattlefield) and!(tap)! target(land[basic]|myLibrary) +auto={1}{G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) text={1}{G}, Sacrifice Diligent Farmhand: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- If Diligent Farmhand is in a graveyard, effects from spells named Muscle Burst count it as a card named Muscle Burst. mana={G} type=Creature @@ -30028,7 +30028,7 @@ toughness=4 [card] name=Drownyard Temple auto={T}:Add{1} -autograveyard={3}:moveto(mybattlefield) and!(tap)! +autograveyard={3}:moveto(mybattlefield) and!(tap(noevent))! text={T}: Add {1} to your mana pool. -- {3}: Return Drownyard Temple from your graveyard to the battlefield tapped. type=Land [/card] @@ -30231,7 +30231,7 @@ toughness=1 [/card] [card] name=Due Respect -auto=emblem transforms((,newability[@movedTo(*|Battlefield):all(trigger) tap])) ueot +auto=emblem transforms((,newability[@movedTo(*|Battlefield):all(trigger) tap(noevent)])) ueot auto=draw:1 controller mana={1}{W} type=Instant @@ -31664,7 +31664,7 @@ toughness=9 [/card] [card] name=Eldrazi Displacer -auto={c}{2}:target(creature) (blink) and!(tap)! +auto={c}{2}:target(creature) (blink) and!(tap(noevent))! text=Devoid (This card has no color.) -- {2}{C}: Exile another target creature, then return it to the battlefield tapped under its owner's control. ({C} represents colorless mana.) mana={2}{W} abilities=devoid @@ -32418,7 +32418,7 @@ toughness=2 [/card] [card] name=Elvish Pioneer -auto=may moveTo(myBattlefield) and!(tap)! target(land[basic]|myhand) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myhand) text=When Elvish Pioneer enters the battlefield, you may put a basic land card from your hand onto the battlefield tapped. mana={G} type=Creature @@ -32730,7 +32730,7 @@ toughness=4 [/card] [card] name=Embodiment of Spring -auto={1}{G}{T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={1}{G}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text={1}{G}{T}:Sacrifice Embodiment of Spring: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. mana={U} type=Creature @@ -34082,7 +34082,7 @@ toughness=3 [card] name=Esper Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(plains,island,swamp|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(plains,island,swamp|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Esper Panorama: Search your library for a basic Plains, Island, or Swamp card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -34577,7 +34577,7 @@ type=Sorcery [/card] [card] name=Everbark Shaman -auto={T}{E(treefolk|mygraveyard)}:target(<2>forest|mylibrary) and!(tap)! moveTo(mybattlefield) +auto={T}{E(treefolk|mygraveyard)}:target(<2>forest|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) text={T}, Exile a Treefolk card from your graveyard: Search your library for two Forest cards and put them onto the battlefield tapped. Then shuffle your library. mana={4}{G} type=Creature @@ -34716,7 +34716,7 @@ type=Enchantment [/card] [card] name=Evolving Wilds -auto={T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text={T}, Sacrifice Evolving Wilds: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -35008,7 +35008,7 @@ type=Sorcery [card] name=Explorer's Scope auto={1}:equip -auto=@combat(attacking) source(mytgt):reveal:1 optionone target(land|reveal) moveto(mybattlefield) and!(tap)! optiononeend optiontwo name(Put Back) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend +auto=@combat(attacking) source(mytgt):reveal:1 optionone target(land|reveal) moveto(mybattlefield) and!(tap(noevent))! optiononeend optiontwo name(Put Back) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend text=Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={1} type=Artifact @@ -35048,7 +35048,7 @@ type=Sorcery [/card] [card] name=Explosive Vegetation -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) text=Search your library for up to two basic land cards and put them onto the battlefield tapped. Then shuffle your library. mana={3}{G} type=Sorcery @@ -35972,8 +35972,8 @@ type=Sorcery [/card] [card] name=Far Wanderings -auto=if type(*|mygraveyard)~morethan~6 then moveto(mybattlefield) and!(tap)! target(<3>land[basic]|mylibrary) -auto=ifnot type(*|mygraveyard)~morethan~6 then moveto(mybattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=if type(*|mygraveyard)~morethan~6 then moveto(mybattlefield) and!(tap(noevent))! target(<3>land[basic]|mylibrary) +auto=ifnot type(*|mygraveyard)~morethan~6 then moveto(mybattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- Threshold - If seven or more cards are in your graveyard, instead search your library for three basic land cards and put them onto the battlefield tapped. Then shuffle your library. mana={2}{G} type=Sorcery @@ -36010,7 +36010,7 @@ toughness=3 [/card] [card] name=Farhaven Elf -auto=may moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text=When Farhaven Elf enters the battlefield, you may search your library for a basic land card and put it onto the battlefield tapped. If you do, shuffle your library. mana={2}{G} type=Creature @@ -36058,7 +36058,7 @@ toughness=2 [/card] [card] name=Farseek -auto=moveto(myBattlefield) and!(tap)! notatarget(plains,island,swamp,mountain|mylibrary) +auto=moveto(myBattlefield) and!(tap(noevent))! notatarget(plains,island,swamp,mountain|mylibrary) text=Search your library for a Plains, Island, Swamp, or Mountain card and put it onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Sorcery @@ -36799,7 +36799,7 @@ type=Sorcery [card] name=Fertilid auto=counter(1/1,2) -auto={1}{G}{C(1/1,-1)}:moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto={1}{G}{C(1/1,-1)}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=Fertilid enters the battlefield with two +1/+1 counters on it. -- {1}{G}, Remove a +1/+1 counter from Fertilid: Target player searches his or her library for a basic land card and puts it onto the battlefield tapped. Then that player shuffles his or her library. mana={2}{G} type=Creature @@ -37792,7 +37792,7 @@ type=Enchantment [card] name=Flagstones of Trokair auto={T}:Add{W} -auto=@movedTo(this|graveyard) from(battlefield):may moveTo(myBattlefield) and!(tap)! target(plains|mylibrary) +auto=@movedTo(this|graveyard) from(battlefield):may moveTo(myBattlefield) and!(tap(noevent))! target(plains|mylibrary) text={T}: Add {W} to your mana pool. -- When Flagstones of Trokair is put into a graveyard from the battlefield, you may search your library for a Plains card and put it onto the battlefield tapped. If you do, shuffle your library. type=Legendary Land [/card] @@ -39161,7 +39161,7 @@ toughness=4 [/card] [card] name=Font of Fertility -auto={1}{G}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) && shuffle +auto={1}{G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) && shuffle text={1}{G}, Sacrifice Font of Fertility: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. mana={1}{G} type=Enchantment @@ -40016,7 +40016,7 @@ toughness=1 name=Frenzied Tilling target=land auto=destroy -auto=target(land[basic]|mylibrary) and!(tap)! moveto(mybattlefield) +auto=target(land[basic]|mylibrary) and!(tap(noevent))! moveto(mybattlefield) text=Destroy target land. Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={3}{R}{G} type=Sorcery @@ -40177,7 +40177,7 @@ type=Land [/card] [card] name=Frontier Guide -auto={3}{G}{T}:moveTo(myBattlefield) and!(tap)! target(land[basic]|myLibrary) +auto={3}{G}{T}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) text={3}{G}, {T}: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Creature @@ -40339,7 +40339,7 @@ toughness=3 [/card] [card] name=Frozen AEther -auto=@movedTo(creature,artifact,land|opponentBattlefield):all(trigger) tap +auto=lord(artifact,creature,land|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Artifacts, creatures, and lands your opponents control enter the battlefield tapped. mana={3}{U} type=Enchantment @@ -41777,7 +41777,7 @@ type=Land name=Geralf's Masterpiece abilities=flying auto=foreach(*|myhand):-1/-1 -autograveyard={3}{U}{discard(*|myhand)}{discard(*|myhand)}{discard(*|myhand)}:moveto(myhand) and!(tap)! +autograveyard={3}{U}{discard(*|myhand)}{discard(*|myhand)}{discard(*|myhand)}:moveto(myhand) and!(tap(noevent))! text=Flying -- Geralf's Masterpiece gets -1/-1 for each card in your hand. -- {3}{U}, Discard three cards: Return Geralf's Masterpiece from your graveyard to the battlefield tapped. mana={3}{U}{U} type=Creature @@ -42400,7 +42400,7 @@ type=Instant [/card] [card] name=Ghoulsteed -auto={2}{B}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap)! +auto={2}{B}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! text={2}{B}, Discard two cards: Return Ghoulsteed from your graveyard to the battlefield tapped. mana={4}{B} type=Creature @@ -46667,7 +46667,7 @@ toughness=1 [card] name=Grixis Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(island,swamp,mountain|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(island,swamp,mountain|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Grixis Panorama: Search your library for a basic Island, Swamp, or Mountain card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -46926,7 +46926,7 @@ type=Enchantment [/card] [card] name=Growth Spasm -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|myLibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|myLibrary) auto=Token(-193507) text=Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. -- Put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} @@ -51985,7 +51985,7 @@ subtype=Elf [card] name=Hunting Wilds target=forest|mylibrary -auto=moveto(mybattlefield) and!(tap)! +auto=moveto(mybattlefield) and!(tap(noevent))! kicker={3}{G} auto=kicker untap && becomes(Creature,3/3,haste,green) forever text=Kicker {3}{G} (You may pay an additional {3}{G} as you cast this spell.) -- Search your library for up to two Forest cards and put them onto the battlefield tapped. Then shuffle your library. -- If Hunting Wilds was kicked, untap all Forests put onto the battlefield this way. They become 3/3 green creatures with haste that are still lands. @@ -52958,7 +52958,7 @@ type=Sorcery [/card] [card] name=Imposing Sovereign -auto=@movedTo(creature|opponentBattlefield):all(trigger) tap +auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures your opponents control enter the battlefield tapped. mana={1}{W} type=Creature @@ -54139,7 +54139,7 @@ type=Sorcery [/card] [card] name=Into the North -auto=moveto(mybattlefield) and!(tap)! notatarget(land[snow]|mylibrary) +auto=moveto(mybattlefield) and!(tap(noevent))! notatarget(land[snow]|mylibrary) text=Search your library for a snow land card and put it onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Sorcery @@ -56027,7 +56027,7 @@ toughness=1 [card] name=Jund Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(swamp,mountain,forest|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(swamp,mountain,forest|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Jund Panorama: Search your library for a basic Swamp, Mountain, or Forest card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -56789,7 +56789,7 @@ name=Karametra, God of Harvests abilities=indestructible auto=this(variable{selesnya}<7) transforms((removetypes,newability[becomes(Legendary Enchantment God)])) auto=this(variable{selesnya}>6) transforms((Legendary Enchantment Creature)) -auto=@movedto(creature|stack) from(*|myhand):moveTo(myBattlefield) and!(tap)! target(forest,plains|mylibrary) +auto=@movedto(creature|stack) from(*|myhand):moveTo(myBattlefield) and!(tap(noevent))! target(forest,plains|mylibrary) text=Indestructible -- As long as your devotion to green and white is less than seven, Karametra isn't a creature. -- Whenever you cast a creature spell, you may search your library for a Forest or Plains card, put it onto the battlefield tapped, then shuffle your library. mana={3}{G}{W} type=Legendary Enchantment Creature @@ -57823,7 +57823,7 @@ type=Artifact [card] name=Khalni Heart Expedition auto=@movedto(land|myBattlefield):counter(0/0,1,Quest) -auto={C(0/0,-3,Quest)}{S}:target(land[basic]|mylibrary) and!(tap)! moveTo(mybattlefield) +auto={C(0/0,-3,Quest)}{S}:target(land[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) text=Landfall - Whenever a land enters the battlefield under your control, you may put a quest counter on Khalni Heart Expedition. -- Remove three quest counters from Khalni Heart Expedition and sacrifice it: Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. mana={1}{G} type=Enchantment @@ -58232,7 +58232,7 @@ type=Sorcery [/card] [card] name=Kismet -auto=@movedTo(creature,artifact,land|opponentBattlefield):all(trigger) tap +auto=lord(artifact,creature,land|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Artifacts, creatures, and lands your opponents control enter the battlefield tapped. mana={3}{W} type=Enchantment @@ -58953,7 +58953,7 @@ toughness=4 [/card] [card] name=Kodama's Reach -auto=name(fetch to play) notatarget(land[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(land[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap)!])) oneshot +auto=name(fetch to play) notatarget(land[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(land[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot text=Search your library for two basic land cards, reveal those cards, and put one onto the battlefield tapped and the other into your hand. Then shuffle your library. mana={2}{G} type=Sorcery @@ -59139,7 +59139,7 @@ toughness=2 [/card] [card] name=Kor Cartographer -auto=may moveTo(myBattlefield) and!(tap)! target(plains|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(plains|mylibrary) text=When Kor Cartographer enters the battlefield, you may search your library for a Plains card, put it onto the battlefield tapped, then shuffle your library. mana={3}{W} type=Creature @@ -59290,7 +59290,7 @@ toughness=1 [/card] [card] name=Korlash, Heir to Blackblade -auto={discard(other *[share!name!]|myhand)}:moveto(mybattlefield) and!(tap)! target(swamp|mylibrary) +auto={discard(other *[share!name!]|myhand)}:moveto(mybattlefield) and!(tap(noevent))! target(swamp|mylibrary) anyzone=type:swamp:mybattlefield/type:swamp:mybattlefield cdaactive auto={1}{B}:regenerate text=Korlash, Heir to Blackblade's power and toughness are each equal to the number of Swamps you control. -- {1}{B}: Regenerate Korlash. -- Grandeur - Discard another card named Korlash, Heir to Blackblade: Search your library for up to two Swamp cards, put them onto the battlefield tapped, then shuffle your library. @@ -62812,7 +62812,7 @@ toughness=2 [/card] [card] name=Loam Dweller -auto=@movedto(arcane,spirit|mystack):may moveto(myBattlefield) and!(tap)! target(land|myhand) +auto=@movedto(arcane,spirit|mystack):may moveto(myBattlefield) and!(tap(noevent))! target(land|myhand) text=Whenever you cast a Spirit or Arcane spell, you may put a land card from your hand onto the battlefield tapped. mana={1}{G} type=Creature @@ -63433,7 +63433,7 @@ toughness=2 [/card] [card] name=Loxodon Gatekeeper -auto=@movedTo(creature,artifact,land|opponentBattlefield):all(trigger) tap +auto=lord(artifact,creature,land|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Artifacts, creatures, and lands your opponents control enter the battlefield tapped. mana={2}{W}{W} type=Creature @@ -65438,7 +65438,7 @@ subtype=Aura [/card] [card] name=Map the Wastes -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|myLibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|myLibrary) auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- Bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) mana={2}{G} @@ -71524,7 +71524,7 @@ subtype=Aura name=Mwonvuli Acid-Moss target=land auto=destroy -auto=target(forest|mylibrary) moveto(mybattlefield) and!(tap)! +auto=target(forest|mylibrary) moveto(mybattlefield) and!(tap(noevent))! text=Destroy target land. Search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library. mana={2}{G}{G} type=Sorcery @@ -72405,7 +72405,7 @@ type=Instant [/card] [card] name=Natural Connection -auto=moveto(mybattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto=moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) text=Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. mana={2}{G} type=Instant @@ -72602,7 +72602,7 @@ toughness=1 [card] name=Naya Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(mountain,forest,plains|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(mountain,forest,plains|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Naya Panorama: Search your library for a basic Mountain, Forest, or Plains card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -74221,14 +74221,14 @@ type=Sorcery [/card] [card] name=Nissa's Pilgrimage -auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap)!])) oneshot else name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap)!])) oneshot +auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot else name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot text=Search your library for up to two basic Forest cards, reveal those cards, and put one onto the battlefield tapped and the rest into your hand. Then shuffle your library. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, search your library for up to three basic Forest cards instead of two. mana={2}{G} type=Sorcery [/card] [card] name=Nissa's Renewal -auto=moveto(mybattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto=moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) auto=life:7 controller text=Search your library for up to three basic land cards, put them onto the battlefield tapped, then shuffle your library. You gain 7 life. mana={5}{G} @@ -75786,7 +75786,7 @@ toughness=3 name=Ojutai Exemplars auto=@movedto(*[-creature]|mystack):choice name(Tap target creature) tap target(creature|battlefield) auto=@movedto(*[-creature]|mystack):choice name(First Strike and Lifelink) transforms((,newability[first strike ueot],newability[lifelink ueot])) ueot -auto=@movedto(*[-creature]|mystack):choice name(Exile and returned tapped) moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield) and!(tap)!])) forever)! +auto=@movedto(*[-creature]|mystack):choice name(Exile and returned tapped) moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield) and!(tap(noevent))!])) forever)! text=Whenever you cast a noncreature spell, choose one ? -- ? Tap target creature. -- ? Ojutai Exemplars gains first strike and lifelink until end of turn. -- ? Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control. mana={2}{W}{W} type=Creature @@ -75977,7 +75977,7 @@ toughness=1 [/card] [card] name=Ondu Giant -auto=may moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text=When Ondu Giant enters the battlefield, search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={3}{G} type=Creature @@ -76048,7 +76048,7 @@ subtype=Aura [card] name=One with Nature target=creature -auto=@damaged(player) from(mytgt):may moveto(myBattlefield) and!(tap)! target(land[basic]|myLibrary) +auto=@damaged(player) from(mytgt):may moveto(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) text=Enchant creature -- Whenever enchanted creature deals combat damage to a player, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. mana={G} type=Enchantment @@ -76501,7 +76501,7 @@ toughness=3 [/card] [card] name=Orb of Dreams -auto=@movedTo(*|Battlefield):all(trigger) tap +auto=lord(*|battlefield) transforms((,newability[tap(noevent)])) text=Permanents enter the battlefield tapped. mana={3} type=Artifact @@ -78279,7 +78279,7 @@ type=Sorcery [card] name=Path to Exile target=creature -auto=transforms((,newability[moveto(exile)],newability[may name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!(tap)!])) oneshot +auto=transforms((,newability[moveto(exile)],newability[may name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!(tap(noevent))!])) oneshot text=Exile target creature. Its controller may search his or her library for a basic land card, put that card onto the battlefield tapped, then shuffle his or her library. mana={W} type=Instant @@ -78362,7 +78362,7 @@ toughness=6 name=Patron of the Moon other={kmoonfolk} name(Moonfolk Offering) abilities=flying,offering -auto={1}:name(put 2 lands in play) moveto(mybattlefield) and!(tap)! notatarget(land|myhand) +auto={1}:name(put 2 lands in play) moveto(mybattlefield) and!(tap(noevent))! notatarget(land|myhand) text=Moonfolk offering (You may cast this card any time you could cast an instant by sacrificing a Moonfolk and paying the difference in mana costs between this and the sacrificed Moonfolk. Mana cost includes color.) -- Flying -- {1}: Put up to two land cards from your hand onto the battlefield tapped. mana={5}{U}{U} type=Legendary Creature @@ -78878,7 +78878,7 @@ toughness=4 [/card] [card] name=Perilous Forays -auto={1}{S(creature|mybattlefield)}:target(*[swamp;island;mountain;forest;plains]|mylibrary) moveTo(myBattlefield) and!(tap)! +auto={1}{S(creature|mybattlefield)}:target(*[swamp;island;mountain;forest;plains]|mylibrary) moveTo(myBattlefield) and!(tap(noevent))! text={1}, Sacrifice a creature: Search your library for a land card with a basic land type and put it onto the battlefield tapped. Then shuffle your library. mana={3}{G}{G} type=Enchantment @@ -80095,7 +80095,7 @@ toughness=1 [/card] [card] name=Phytotitan -autograveyard=@movedTo(this|graveyard) from(myBattlefield):phaseaction[my upkeep once]:moveTo(myBattlefield) and!(tap)! +autograveyard=@movedTo(this|graveyard) from(myBattlefield):phaseaction[my upkeep once]:moveTo(myBattlefield) and!(tap(noevent))! text=When Phytotitan dies, return it to the battlefield tapped under its owner's control at the beginning of his or her next upkeep. mana={4}{G}{G} type=Creature @@ -82028,8 +82028,8 @@ toughness=3 [card] name=Primeval Titan abilities=trample -auto=may target(land|mylibrary) and!(tap)! moveTo(mybattlefield) -auto=@combat(attacking) source(this):may target(land|mylibrary) moveTo(mybattlefield) and!(tap)! +auto=may target(land|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) +auto=@combat(attacking) source(this):may target(land|mylibrary) moveTo(mybattlefield) and!(tap(noevent))! text=Trample -- Whenever Primeval Titan enters the battlefield or attacks, you may search your library for up to two land cards, put them onto the battlefield tapped, then shuffle your library. mana={4}{G}{G} type=Creature @@ -83886,7 +83886,7 @@ toughness=1 [/card] [card] name=Quirion Trailblazer -auto=may moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=When Quirion Trailblazer enters the battlefield, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. mana={3}{G} type=Creature @@ -84890,7 +84890,7 @@ toughness=4 [/card] [card] name=Rampant Growth -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|myLibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|myLibrary) text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Sorcery @@ -84991,7 +84991,7 @@ type=Instant [/card] [card] name=Ranger's Path -auto=name(fetch) moveTo(myBattlefield) and!(tap)! notatarget(forest|mylibrary) +auto=name(fetch) moveTo(myBattlefield) and!(tap(noevent))! notatarget(forest|mylibrary) text=Search your library for up to two Forest cards and put them onto the battlefield tapped. Then shuffle your library. mana={3}{G} type=Sorcery @@ -89337,7 +89337,7 @@ toughness=3 [/card] [card] name=Root Maze -auto=@movedTo(artifact,land|battlefield):all(trigger) tap +auto=lord(artifact,land|battlefield) transforms((,newability[tap(noevent)])) text=Artifacts and lands enter the battlefield tapped. mana={G} type=Enchantment @@ -89898,7 +89898,7 @@ toughness=1 [card] name=Ruin in Their Wake target=land|myBattlefield -auto=if type(waste|mybattlefield)~morethan~0 then moveto(mybattlefield) and!(tap)! else moveto(myhand) +auto=if type(waste|mybattlefield)~morethan~0 then moveto(mybattlefield) and!(tap(noevent))! else moveto(myhand) text=Devoid (This card has no color.) -- Search your library for a basic land card and reveal it. You may put that card onto the battlefield tapped if you control a land named Wastes. Otherwise, put that card into your hand. Then shuffle your library. mana={1}{G} abilities=devoid @@ -91015,7 +91015,7 @@ toughness=3 [/card] [card] name=Sakura-Tribe Elder -auto={S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text=Sacrifice Sakura-Tribe Elder: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. mana={1}{G} type=Creature @@ -94132,7 +94132,7 @@ toughness=1 [/card] [card] name=Seedguide Ash -auto=@movedTo(this|graveyard) from(battlefield):target(forest|mylibrary) moveTo(myBattlefield) and!(tap)! +auto=@movedTo(this|graveyard) from(battlefield):target(forest|mylibrary) moveTo(myBattlefield) and!(tap(noevent))! text=When Seedguide Ash is put into a graveyard from the battlefield, you may search your library for up to three Forest cards and put them onto the battlefield tapped. If you do, shuffle your library. mana={4}{G} type=Creature @@ -97764,7 +97764,7 @@ toughness=7 [card] name=Silkwing Scout abilities=flying -auto={G}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text=Flying -- {G}, Sacrifice Silkwing Scout: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={2}{U} type=Creature @@ -97997,7 +97997,7 @@ toughness=4 [/card] [card] name=Silverglade Pathfinder -auto={1}{G}{T}{discard(*|myhand)}:moveTo(myBattlefield) and!(tap)! target(basic|myLibrary) +auto={1}{G}{T}{discard(*|myhand)}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|myLibrary) text={1}{G}, {T}, Discard a card: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Creature @@ -101039,7 +101039,7 @@ type=Sorcery [/card] [card] name=Solemn Simulacrum -auto=may moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) auto=@movedTo(this|graveyard) from(Battlefield):may draw:1 controller text=When Solemn Simulacrum enters the battlefield, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. -- When Solemn Simulacrum dies, you may draw a card. mana={4} @@ -105403,7 +105403,7 @@ toughness=2 [card] name=Stitchwing Skaab abilities=flying -auto={1}{U}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap)! +auto={1}{U}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! text=Flying -- {1}{U}, Discard two cards: Return Stitchwing Skaab from your graveyard to the battlefield tapped. mana={3}{U} type=Creature @@ -108325,7 +108325,7 @@ subtype=Equipment name=Sword of the Animist auto={2}:equip auto=teach(creature) 1/1 -auto=@combat(attacking) source(mytgt):may notatarget(land[basic]|mylibrary) moveto(mybattlefield) and!(tap)! +auto=@combat(attacking) source(mytgt):may notatarget(land[basic]|mylibrary) moveto(mybattlefield) and!(tap(noevent))! text=Equipped creature gets +1/+1. -- Whenever equipped creature attacks, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. -- Equip {2} mana={2} type=Legendary Artifact @@ -108518,7 +108518,7 @@ type=Instant [card] name=Sylvan Primordial abilities=reach -auto=name(destroy) target(*[-creature]|opponentbattlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):ability$!notatarget(forest|mylibrary) moveto(mybattlefield) and!(tap)!!$ opponent],newability[destroy])) +auto=name(destroy) target(*[-creature]|opponentbattlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):ability$!notatarget(forest|mylibrary) moveto(mybattlefield) and!(tap(noevent))!!$ opponent],newability[destroy])) text=Reach -- When Sylvan Primordial enters the battlefield, for each opponent, destroy target noncreature permanent that player controls. For each permanent destroyed this way, search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library. mana={5}{G}{G} type=Creature @@ -110506,7 +110506,7 @@ toughness=9 [card] name=Terminal Moraine auto={T}:Add{1} -auto={2}{T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={2}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text={T}: Add {1} to your mana pool. -- {2}, {T}, Sacrifice Terminal Moraine: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -110581,13 +110581,13 @@ toughness=2 [card] name=Terrain Generator auto={T}:Add{1} -auto={2}{T}:moveTo(myBattlefield) and!(tap)! target(land[basic]|myhand) +auto={2}{T}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myhand) text={T}: Add {1} to your mana pool. -- {2}, {T}: You may put a basic land card from your hand onto the battlefield tapped. type=Land [/card] [card] name=Terramorphic Expanse -auto={T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text={T}, Sacrifice Terramorphic Expanse: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -111077,7 +111077,7 @@ toughness=2 [card] name=Thawing Glaciers auto=tap(noevent) -auto={1}{T}:moveTo(mybattlefield) and!(tap)! target(land[basic]|mylibrary) && phaseaction[cleanup,sourceinplay] moveto(myhand) all(this) +auto={1}{T}:moveTo(mybattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) && phaseaction[cleanup,sourceinplay] moveto(myhand) all(this) text=Thawing Glaciers enters the battlefield tapped. -- {1}, {T}: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. Return Thawing Glaciers to its owner's hand at the beginning of the next cleanup step. type=Land [/card] @@ -116375,7 +116375,7 @@ toughness=2 name=Ulvenwald Hydra abilities=reach anyzone=type:land:mybattlefield/type:land:mybattlefield cdaactive -auto=may target(land|mylibrary) moveto(mybattlefield) and!(tap)! +auto=may target(land|mylibrary) moveto(mybattlefield) and!(tap(noevent))! text=Reach -- Ulvenwald Hydra's power and toughness are each equal to the number of lands you control. -- When Ulvenwald Hydra enters the battlefield, you may search your library for a land card, put it onto the battlefield tapped, then shuffle your library. mana={4}{G}{G} type=Creature @@ -117347,7 +117347,7 @@ type=Sorcery [/card] [card] name=Uphill Battle -auto=@movedTo(creature|opponentBattlefield):all(trigger) tap +auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures your opponents play enter the battlefield tapped. mana={2}{R} type=Enchantment @@ -117383,7 +117383,7 @@ type=Enchantment [card] name=Urabrask the Hidden auto=lord(creature|mybattlefield) haste -auto=@movedTo(creature|opponentBattlefield):all(trigger) tap +auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures you control have Haste. -- Creatures your opponents control enter the battlefield tapped. mana={3}{R}{R} type=Legendary Creature @@ -120103,7 +120103,7 @@ toughness=2 [/card] [card] name=Viridian Emissary -auto=@movedTo(this|graveyard) from(battlefield):may moveTo(mybattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=@movedTo(this|graveyard) from(battlefield):may moveTo(mybattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=When Viridian Emissary dies, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. mana={1}{G} type=Creature @@ -122678,7 +122678,7 @@ type=Enchantment [card] name=Warped Landscape auto={T}:Add{1} -auto={2}{T}{s}:moveto(mybattlefield) target(basic|mylibrary) and!(tap)! +auto={2}{T}{s}:moveto(mybattlefield) target(basic|mylibrary) and!(tap(noevent))! text={T}: Add {1} to your mana pool. -- {2}, {T}, Sacrifice Warped Landscape: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -123143,7 +123143,7 @@ subtype=Aura [/card] [card] name=Wayfarer's Bauble -auto={2}{T}{S}:moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto={2}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text={2}, {T}, Sacrifice Wayfarer's Bauble: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={1} type=Artifact @@ -126410,7 +126410,7 @@ toughness=6 name=Xathrid Necromancer Zombie type=Creature subtype=Zombie -auto=tap +auto=tap(noevent) power=2 toughness=2 color=black @@ -126548,8 +126548,8 @@ type=Land [card] name=Yavimaya Dryad abilities=forestwalk -auto=may name(my battlefield) moveTo(myBattlefield) and!(tap)! target(forest|mylibrary) -auto=may name(opponent's battlefield) moveTo(opponentBattlefield) and!(tap)! target(forest|mylibrary) +auto=may name(my battlefield) moveTo(myBattlefield) and!(tap(noevent))! target(forest|mylibrary) +auto=may name(opponent's battlefield) moveTo(opponentBattlefield) and!(tap(noevent))! target(forest|mylibrary) text=Forestwalk -- When Yavimaya Dryad enters the battlefield, you may search your library for a Forest card and put it onto the battlefield tapped under target player's control. If you do, shuffle your library. mana={1}{G}{G} type=Creature @@ -126591,7 +126591,7 @@ toughness=1 [/card] [card] name=Yavimaya Granger -auto=may moveTo(myBattlefield) and!(tap)! target(land[basic]|myLibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) auto=upcost[{2}{G};next upkeep] sacrifice text=Echo {2}{G} (At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.) -- When Yavimaya Granger enters the battlefield, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. mana={2}{G} @@ -127452,7 +127452,7 @@ toughness=2 [card] name=Zombie Apocalypse auto=destroy all(human) -auto=all(creature[zombie]|mygraveyard) moveTo(mybattlefield) and!(tap)! +auto=all(creature[zombie]|mygraveyard) moveTo(mybattlefield) and!(tap(noevent))! text=Return all Zombie creature cards from your graveyard to the battlefield tapped, then destroy all Humans. mana={3}{B}{B}{B} type=Sorcery @@ -127572,7 +127572,7 @@ toughness=2 name=Zombie Token type=Creature subtype=Zombie -auto=tap +auto=tap(noevent) power=2 toughness=2 color=black diff --git a/projects/mtg/include/GameObserver.h b/projects/mtg/include/GameObserver.h index 2f520043c..6d451a392 100644 --- a/projects/mtg/include/GameObserver.h +++ b/projects/mtg/include/GameObserver.h @@ -126,6 +126,8 @@ class GameObserver{ void Affinity(); bool AffinityNeedsUpdate; void addObserver(MTGAbility * observer); + void checkLegendary(MTGCardInstance * card); + map cards; bool removeObserver(ActionElement * observer); void startGame(GameType, Rules * rules); void untapPhase(); diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index cf0ea0905..9892a118d 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -897,7 +897,13 @@ void GameObserver::gameStateBasedEffects() int nbcards = z->nb_cards; //------------------------------ p->nomaxhandsize = (z->hasAbility(Constants::NOMAXHAND)); - + //legendary + for (int cl = 0; cl < nbcards; cl++) + { + MTGCardInstance * c = z->cards[cl]; + if(!c->isPhased && c->hasType(Subtypes::TYPE_LEGENDARY) && !c->has(Constants::NOLEGEND)) + checkLegendary(c); + } ///////////////////////////////////////////////// //handle end of turn effects while we're at it.// ///////////////////////////////////////////////// @@ -1021,6 +1027,43 @@ void GameObserver::gameStateBasedEffects() } } +void GameObserver::checkLegendary(MTGCardInstance * card) +{ + map::iterator it; + int destroy = 0; + + vectoroldCards; + for (it = cards.begin(); it != cards.end(); it++) + { + MTGCardInstance * comparison = (*it).first; + if (comparison != card && comparison->controller() == card->controller() && !(comparison->getName().compare(card->getName()))) + { + oldCards.push_back(comparison); + destroy = 1; + } + } + if(destroy) + { + vectorselection; + MultiAbility * multi = NEW MultiAbility(this, this->mLayers->actionLayer()->getMaxId(), card, card, NULL); + for(unsigned int i = 0;i < oldCards.size();i++) + { + AAMover *a = NEW AAMover(this, this->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New"); + a->oneShot = true; + multi->Add(a); + } + multi->oneShot = 1; + MTGAbility * a1 = multi; + selection.push_back(a1); + AAMover *b = NEW AAMover(this, this->mLayers->actionLayer()->getMaxId(), card, card,"ownergraveyard","Keep Old"); + b->oneShot = true; + MTGAbility * b1 = b; + selection.push_back(b1); + MTGAbility * menuChoice = NEW MenuAbility(this, this->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule"); + menuChoice->addToGame(); + } +} + void GameObserver::enchantmentStatus() { for (int i = 0; i < 2; i++) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index befb63824..4a210d44a 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -3187,7 +3187,7 @@ int MTGLegendRule::canBeInList(MTGCardInstance * card) return 0; if (card->hasType(Subtypes::TYPE_LEGENDARY) && card->controller()->game->inPlay->hasCard(card)) { - if(card->has(Constants::NOLEGEND)) + if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasName("Mirror Gallery")||card->controller()->inPlay()->hasName("Mirror Gallery")) return 0; else return 1; From eebcc9c9258ab0727992d61d091c50b5488c4ee2 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 27 Jul 2016 06:31:03 +0800 Subject: [PATCH 7/8] Fix CDAACTIVE & transformed card colors cdaactive has its own computation, so exclude it on flip/transform cards ability --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 37 ++++++++--- projects/mtg/src/AllAbilities.cpp | 67 ++++++++++---------- 2 files changed, 63 insertions(+), 41 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 383e7190b..6d950a954 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -4616,8 +4616,8 @@ toughness=2 name=Archangel Avacyn abilities=flash,flying,vigilance auto=all(creature|mybattlefield) indestructible ueot -auto=@movedto(*[-angel]|graveyard) from(mybattlefield): flip(Avacyn, the Purifier) -text=flash, flying, vigilance -- when Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn -- when a non-angel you control dies, transform Archangel Avacyn +auto=@movedto(creature[-angel]|graveyard) from(mybattlefield) once:phaseaction[upkeep once,sourceinplay] flip(Avacyn, the Purifier) +text=Flash -- Flying, vigilance -- When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn. -- When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep. mana={3}{W}{W} type=Legendary Creature subtype=Angel @@ -5180,6 +5180,7 @@ auto={C(0/0,-6,Loyalty)}:name(emblem) emblem transforms((,newability[lord(creatu text=+1: creatures you control get +1/+1 and trample until end of turn -- -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player, flip -- -6: you get an emblem with 'creatures you control have haste and '{T}: this creature deals damage equal to its power to target creature or player' type=Planeswalker subtype=Arlinn +color=red,green [/card] [card] name=Arm with AEther @@ -6634,6 +6635,7 @@ auto=damage:3 opponent text=flying -- when this creature transforms into Avacyn, the Purifier, it deals 3 damage to each other creature and each opponent type=Legendary Creature subtype=Angel +color=red power=6 toughness=5 [/card] @@ -7242,6 +7244,7 @@ auto=moveto(ownerhand) all(creature[-horror]) text=When this creature transforms into Awoken Horror, return all non-Horror creatures to their owners' hands. type=Creature subtype=Kraken Horror +color=blue power=7 toughness=8 [/card] @@ -13407,6 +13410,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Convicted Kille text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform Branded Howler. type=Creature subtype=Werewolf +color=red power=4 toughness=4 [/card] @@ -19512,6 +19516,7 @@ name=Clue auto={2}{s}: draw:1 text={2}, sacrifice this token, draw a card type=Artifact +subtype=Clue [/card] [card] name=Clutch of Currents @@ -25402,7 +25407,7 @@ type=Artifact [card] name=Declaration in Stone target=creature -auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[@movedto(exile) all([share!name!])token(Clue) controller])) +auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[moveto(exile)],newability[token(Clue) controller])) text=Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way. mana={1}{W} type=Sorcery @@ -26216,6 +26221,7 @@ auto=destroy target(creature) text=When this creature transforms into Demon-Possessed Witch, you may destroy target creature. type=Creature subtype=Human Shaman +color=black power=4 toughness=3 [/card] @@ -37969,6 +37975,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Kessig Forgemas text=Whenever Flameheart Werewolf blocks or becomes blocked by a creature, Flameheart Werewolf deals 2 damage to that creature. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Flameheart Werewolf. type=Creature subtype=Werewolf +color=red power=3 toughness=2 [/card] @@ -41364,6 +41371,7 @@ abilities=menace text=Menace (This creature can't be blocked except by two or more creatures.) -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Gatstaf Ravagers. type=Creature subtype=Werewolf +color=red power=6 toughness=5 [/card] @@ -53948,6 +53956,7 @@ auto=@combat(notblocked) source(this):may flip(Elusive Tormentor) text=Hexproof, indestructible -- Insidious Mist can't block and can't be blocked. -- Whenever Insidious Mist attacks and isn't blocked, you may pay {2}{B}. If you do, transform it. type=Creature subtype=Elemental +color=blue power=0 toughness=1 [/card] @@ -59545,6 +59554,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Duskwatch Recru text=Creature spells you cast cost {1} less to cast. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler. type=Creature subtype=Werewolf +color=green power=3 toughness=3 [/card] @@ -60411,6 +60421,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Lambholt Pacifi text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lambholt Butcher. type=Creature subtype=Werewolf +color=green power=4 toughness=4 [/card] @@ -60427,7 +60438,7 @@ toughness=2 [card] name=Lambholt Pacifist abilities=cantattack -auto=aslongas(creature[power>3]|mybattlefield)-cantattack +auto=aslongas(creature[power>=4]|mybattlefield) transforms((,newability[-cantattack])) auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Lambholt Butcher) text=Lambholt Pacifist can't attack unless you control a creature with power 4 or greater. -- At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Pacifist. mana={1}{G} @@ -62978,6 +62989,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Hermit of the N text=Whenever an opponent casts a spell during your turn, draw two cards. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lone Wolf of the Natterknolls. type=Creature subtype=Werewolf +color=green power=3 toughness=5 [/card] @@ -63829,6 +63841,7 @@ auto=may (blink)forsrc target(creature) text=When this creature transforms into Lunarch Inquisitors, you may exile another target creature until Lunarch Inquisitors leaves the battlefield. type=Creature subtype=Human Cleric +color=white power=4 toughness=4 [/card] @@ -70419,6 +70432,7 @@ text=Menace (This creature can't be blocked except by two or more creatures.) -- abilities=menace type=Creature subtype=Werewolf +color=red power=2 toughness=2 [/card] @@ -72665,6 +72679,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Breakneck Rider text=Attacking creatures you control get +1/+0 and have trample. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Neck Breaker. type=Creature subtype=Werewolf +color=red power=4 toughness=3 [/card] @@ -76030,6 +76045,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Solitary Hunter text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform One of the Pack. type=Creature subtype=Werewolf +color=green power=5 toughness=6 [/card] @@ -82276,8 +82292,8 @@ type=Enchantment [/card] [card] name=Prized Amalgam -autograveyard=@movedto(other creature|mybattlefield) from(mygraveyard):phaseactionmulti[endofturn once] moveto(mybattlefield) && tap -autograveyard=@movedto(other creature|mystack) from(mygraveyard):phaseactionmulti[endofturn once] moveto(mybattlefield) && tap +autograveyard=@movedto(other creature|mybattlefield) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap +autograveyard=@movedto(other creature|mystack) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap text=Whenever a creature enters the battlefield, if it entered from your graveyard or you cast it from your graveyard, return Prized Amalgam from your graveyard to the battlefield tapped at the beginning of the next end step. mana={1}{U}{B} type=Creature @@ -112858,6 +112874,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Hinterland Logg text=Trample -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Timber Shredder. type=Creature subtype=Werewolf +color=green power=4 toughness=2 [/card] @@ -113153,7 +113170,7 @@ toughness=3 [card] name=Tireless Tracker auto=@movedto(land|mybattlefield):token(Clue) controller -auto=@sacrificed(clue|mybattlefield):(counter(1/1,1) +auto=@sacrificed(clue|mybattlefield):counter(1/1,1) text=Whenever a land enters the battlefield under your control, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker. mana={2}{G} type=Creature @@ -117382,7 +117399,7 @@ type=Enchantment [/card] [card] name=Urabrask the Hidden -auto=lord(creature|mybattlefield) haste +auto=emblem transforms((,newability[aslongas(Urabrask the Hidden|mybattlefield) lord(creature|mybattlefield) haste >0])) ueot auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures you control have Haste. -- Creatures your opponents control enter the battlefield tapped. mana={3}{R}{R} @@ -119753,6 +119770,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Geier Reach Ban text=Whenever a Werewolf enters the battlefield under your control, you may transform it. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Vildin-Pack Alpha. type=Creature subtype=Werewolf +color=red power=4 toughness=3 [/card] @@ -123588,11 +123606,12 @@ type=Land [/card] [card] name=Westvale Cult Leader -auto=foreach(creature|mybattlefield) 1/1 +anyzone=type:creature:mybattlefield/type:creature:mybattlefield cdaactive auto=@each my endofturn:token(Human Cleric,Creature Human Cleric,1/1,white,black) text=Westvale Cult Leader's power and toughness are each equal to the number of creatures you control. -- At the beginning of your end step, put a 1/1 white and black Human Cleric creature token onto the battlefield. type=Creature subtype=Human Cleric +color=white power=* toughness=* [/card] diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 7d2bb4d39..58e8c65b6 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1126,27 +1126,27 @@ AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, } } - for (vector::iterator it = found.begin(); it != found.end(); it++) - { - MTGCardInstance * cardFirst = *it; - if (cardFirst->isLand()) - continue; + for (vector::iterator it = found.begin(); it != found.end(); it++) + { + MTGCardInstance * cardFirst = *it; + if (cardFirst->isLand()) + continue; for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i) - { - if (cardFirst->hasColor(i)) - { - for (vector::iterator secondit = found.begin(); secondit != found.end(); secondit++) - { - MTGCardInstance * cardSecond = *secondit; - if (cardSecond->isLand()) - continue; - if (cardSecond->hasColor(i) && cardFirst != cardSecond) - { - repeating = true; - } - } - } - } + { + if (cardFirst->hasColor(i)) + { + for (vector::iterator secondit = found.begin(); secondit != found.end(); secondit++) + { + MTGCardInstance * cardSecond = *secondit; + if (cardSecond->isLand()) + continue; + if (cardSecond->hasColor(i) && cardFirst != cardSecond) + { + repeating = true; + } + } + } + } } do @@ -1183,18 +1183,18 @@ AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, } } - for (vector::iterator it = found.begin(); it != found.end(); it++) - { - MTGCardInstance * cardFirst = *it; - for (vector::iterator secondit = found.begin(); secondit != found.end(); secondit++) - { - MTGCardInstance * cardSecond = *secondit; - if (cardSecond->name == cardFirst->name && cardFirst != cardSecond) - { - repeating = true; - } - } - + for (vector::iterator it = found.begin(); it != found.end(); it++) + { + MTGCardInstance * cardFirst = *it; + for (vector::iterator secondit = found.begin(); secondit != found.end(); secondit++) + { + MTGCardInstance * cardSecond = *secondit; + if (cardSecond->name == cardFirst->name && cardFirst != cardSecond) + { + repeating = true; + } + } + } do @@ -3224,11 +3224,14 @@ int AAFlip::resolve() { toughMod =_target->toughness - _target->origtoughness; } + if(!_target->isCDA) + { _target->power = powerlessThanOriginal?myFlip->power - powerMod:myFlip->power + powerMod; _target->life = toughLessThanOriginal?myFlip->toughness - toughMod:myFlip->toughness + toughMod; _target->toughness = toughLessThanOriginal?myFlip->toughness - toughMod:myFlip->toughness + toughMod; _target->origpower = myFlip->origpower; _target->origtoughness = myFlip->origtoughness; + } SAFE_DELETE(myFlip); _target->mPropertiesChangedSinceLastUpdate = true; } From 014ca36a4af74d50d1e34458c1992c4e8f7aa76d Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 27 Jul 2016 07:11:30 +0800 Subject: [PATCH 8/8] force event for token sacrifice --- projects/mtg/include/AllAbilities.h | 2 ++ projects/mtg/include/WEvent.h | 3 +- projects/mtg/src/AllAbilities.cpp | 6 +++- projects/mtg/src/ExtraCost.cpp | 46 ++++++++++++++++------------- projects/mtg/src/WEvent.cpp | 4 +-- 5 files changed, 36 insertions(+), 25 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 94d176f18..58541d151 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -1370,6 +1370,8 @@ public: { WEventCardSacrifice * e = dynamic_cast (event); if (!e) return 0; + if (e->istoken) + return 1; MTGCardInstance * check = e->cardAfter; MTGGameZone * oldZone = e->cardAfter->currentZone; check->currentZone = check->previousZone; diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 1ee984ffa..33d70fe31 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -184,7 +184,8 @@ struct WEventCardBlocked : public WEventCardUpdate { //event when card is sacrificed. struct WEventCardSacrifice : public WEventCardUpdate { MTGCardInstance * cardAfter; - WEventCardSacrifice(MTGCardInstance * card,MTGCardInstance * afterCard); + bool istoken; + WEventCardSacrifice(MTGCardInstance * card,MTGCardInstance * afterCard, bool token = false); virtual Targetable * getTarget(int target); }; diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 58e8c65b6..213e9c6f2 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -2704,10 +2704,14 @@ int AASacrificeCard::resolve() { Player * p = _target->controller(); MTGCardInstance * beforeCard = _target; + WEvent * e; + if(!_target->isToken) + e = NEW WEventCardSacrifice(beforeCard,_target); + else + e = NEW WEventCardSacrifice(beforeCard,_target,true); p->game->putInGraveyard(_target); while(_target->next) _target = _target->next; - WEvent * e = NEW WEventCardSacrifice(beforeCard,_target); game->receiveEvent(e); if(andAbility) { diff --git a/projects/mtg/src/ExtraCost.cpp b/projects/mtg/src/ExtraCost.cpp index 9946291a8..1e2f54874 100644 --- a/projects/mtg/src/ExtraCost.cpp +++ b/projects/mtg/src/ExtraCost.cpp @@ -978,14 +978,14 @@ ManaCost * Convoke::getReduction() tc->maxtargets = source->getManaCost()->getConvertedCost(); if (tc->getNbTargets()) { - vectortargetlist = tc->getTargetsFrom(); - for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) + vectortargetlist = tc->getTargetsFrom(); + for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) { bool next = false; for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i) - { - if (next == true) - break; + { + if (next == true) + break; MTGCardInstance * targetCard = dynamic_cast(*it); if ((targetCard->getManaCost()->hasColor(i) || targetCard->hasColor(i)) && toReduce->hasColor(i)) { @@ -1004,13 +1004,13 @@ ManaCost * Convoke::getReduction() { SAFE_DELETE(toReduce); toReduce = NEW ManaCost(source->getManaCost()); - for (vector::reverse_iterator it = targetlist.rbegin(); it != targetlist.rend(); it++) + for (vector::reverse_iterator it = targetlist.rbegin(); it != targetlist.rend(); it++) { bool next = false; for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i) - { - if (next == true) - break; + { + if (next == true) + break; MTGCardInstance * targetCard = dynamic_cast(*it); if ((targetCard->getManaCost()->hasColor(i) || targetCard->hasColor(i)) && toReduce->hasColor(i)) { @@ -1036,9 +1036,9 @@ int Convoke::doPay() ManaCost * toReduce = getReduction(); target->controller()->getManaPool()->pay(toReduce); SAFE_DELETE(toReduce); - vectortargetlist = tc->getTargetsFrom(); - for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) - { + vectortargetlist = tc->getTargetsFrom(); + for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) + { MTGCardInstance * targetCard = dynamic_cast(*it); source->storedCard = targetCard->createSnapShot(); targetCard->tap(); @@ -1104,9 +1104,9 @@ int Delve::doPay() target->controller()->getManaPool()->pay(toReduce); SAFE_DELETE(toReduce); - vectortargetlist = tc->getTargetsFrom(); - for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) - { + vectortargetlist = tc->getTargetsFrom(); + for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) + { MTGCardInstance * targetCard = dynamic_cast(*it); source->storedCard = targetCard->createSnapShot(); targetCard->controller()->game->putInExile(targetCard); @@ -1288,8 +1288,12 @@ int SacrificeCost::doPay() { MTGCardInstance * beforeCard = target; source->storedCard = target->createSnapShot(); + WEvent * e; + if(!target->isToken) + e = NEW WEventCardSacrifice(beforeCard,target); + else + e = NEW WEventCardSacrifice(beforeCard,target,true); target->controller()->game->putInGraveyard(target); - WEvent * e = NEW WEventCardSacrifice(beforeCard,target); GameObserver * game = target->owner->getObserver(); game->receiveEvent(e); target = NULL; @@ -1567,11 +1571,11 @@ int ExtraCosts::doPay() } if (costs[i]->tc) { - vectortargetlist = costs[i]->tc->getTargetsFrom(); - for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) - { - costs[i]->target = dynamic_cast(*it); - costs[i]->doPay(); + vectortargetlist = costs[i]->tc->getTargetsFrom(); + for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) + { + costs[i]->target = dynamic_cast(*it); + costs[i]->doPay(); } } else diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index 8c7d1062e..3aa726596 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -99,8 +99,8 @@ player(player), nb_cards(nb_cards),drawAbility(cardDraw) { } -WEventCardSacrifice::WEventCardSacrifice(MTGCardInstance * card, MTGCardInstance * after) : - WEventCardUpdate(card),cardAfter(after) +WEventCardSacrifice::WEventCardSacrifice(MTGCardInstance * card, MTGCardInstance * after, bool token) : + WEventCardUpdate(card),cardAfter(after),istoken(token) { }