From ab1fbaa806fc48509b01a1649c7e8dab8745ec7b Mon Sep 17 00:00:00 2001 From: Eduardo Date: Sun, 14 Apr 2019 19:57:01 -0500 Subject: [PATCH] New game modes, bug fixes in primitives, improving AI, new planeswalkers type rule New rules based on vanguard, 3 new random game modes, one is tribal and one uses any card in the game. Several corrections and bugs fixes. Cards with x in their cost and that can target any player used to crash the game. Teaching AI new things and changing values of efficiency. You can have multiple "Jace" planeswalkers, you can't have two of the exact same name (no two Jace, the mind sculptor). --- projects/mtg/bin/Res/rules/Blitzkrieg.txt | 2 +- projects/mtg/bin/Res/rules/awards.dat | 56 +- projects/mtg/bin/Res/sets/PPR/_cards.dat | 3210 ----------------- projects/mtg/bin/Res/sets/SVC/_cards.dat | 412 --- .../mtg/bin/Res/sets/primitives/_macros.txt | 8 + .../bin/Res/sets/primitives/borderline.txt | 21 +- projects/mtg/bin/Res/sets/primitives/mtg.txt | 248 +- projects/mtg/include/MTGDefinitions.h | 3 + projects/mtg/include/Rules.h | 3 + projects/mtg/include/Wagic_Version.h | 2 +- projects/mtg/src/AIPlayerBaka.cpp | 239 +- projects/mtg/src/CardGui.cpp | 2 +- projects/mtg/src/CardPrimitive.cpp | 9 +- projects/mtg/src/GameStateDuel.cpp | 5 +- projects/mtg/src/GuiPlay.cpp | 2 +- projects/mtg/src/MTGAbility.cpp | 54 +- projects/mtg/src/MTGRules.cpp | 72 +- projects/mtg/src/ManaCost.cpp | 4 +- projects/mtg/src/Rules.cpp | 165 +- 19 files changed, 623 insertions(+), 3894 deletions(-) delete mode 100644 projects/mtg/bin/Res/sets/PPR/_cards.dat delete mode 100644 projects/mtg/bin/Res/sets/SVC/_cards.dat diff --git a/projects/mtg/bin/Res/rules/Blitzkrieg.txt b/projects/mtg/bin/Res/rules/Blitzkrieg.txt index 8b914995e..3ce2e91c8 100644 --- a/projects/mtg/bin/Res/rules/Blitzkrieg.txt +++ b/projects/mtg/bin/Res/rules/Blitzkrieg.txt @@ -1,4 +1,4 @@ -name=Blitzkrieg +name=Mode Blitzkrieg unlock=prx_geirkztilb [INIT] mode=mtg diff --git a/projects/mtg/bin/Res/rules/awards.dat b/projects/mtg/bin/Res/rules/awards.dat index bb9cc606f..592dc39c2 100644 --- a/projects/mtg/bin/Res/rules/awards.dat +++ b/projects/mtg/bin/Res/rules/awards.dat @@ -34,4 +34,58 @@ unlock_text=Blitzkrieg Mode Unlocked teaser=Like to play fast? Unlock Blitzkrieg Mode :) trophyroom_text=Won with more than 18 lands. unlock_condition=type(land|myBattlefield)~morethan~18 -[/award] \ No newline at end of file +[/award] + +[award] +name=Paradise +id=prx_paradise +unlock_img= +unlock_text=Birds of Paradise Mode Unlocked +teaser=Utopia! Bring me down to the Paradise City. +Lands you control have "{T}: Add one mana of any color." +trophyroom_text=Won with Birds of Paradise on the battlefield. +unlock_condition=type(Birds of Paradise|mybattlefield)~morethan~0 +[/award] + +[award] +name=Morinfen Mode +id=prx_morinfen +unlock_img= +unlock_text=Morinfen Mode Unlocked +teaser="I looked into its eyes, and its soul was so empty I saw no reflection, no light there." — Crovax +At the beginning of your upkeep, you lose 1 life for each permanent you control. +trophyroom_text=Won with less than 5 life. +unlock_condition=this(controllerlife<=6) +[/award] + +[award] +name=Horde +id=prx_horde +unlock_img= +unlock_text=Tribal Horde Mode Unlocked +teaser="From shards and splinters I call forth my living horde." -Molimo, maro-sorcerer +trophyroom_text=Won with more than 25 life. +unlock_condition=this(controllerlife>=26) +[/award] + +[award] +name=False God +id=prx_karona +unlock_img= +unlock_text=False God Mode Unlocked +teaser=At the beginning of your upkeep, exchange control of a permanent you control chosen at random and a permanent target opponent controls chosen at random. +trophyroom_text=Devotion to red more than 7. +unlock_condition=this(variable{type:manar}>7) +[/award] + +[award] +name=Titania Mode +id=prx_titania +unlock_img= +unlock_text=Titania Mode Unlocked +teaser=Voice of the Argoth forest, defender of its creatures, and enforcer of its laws, Titania is literally an aspect of the forest itself. +You may play an additional land on each of your turns. +trophyroom_text=Devotion to green more than 7. +unlock_condition=this(variable{type:manag}>7) +[/award] + diff --git a/projects/mtg/bin/Res/sets/PPR/_cards.dat b/projects/mtg/bin/Res/sets/PPR/_cards.dat deleted file mode 100644 index 083440e01..000000000 --- a/projects/mtg/bin/Res/sets/PPR/_cards.dat +++ /dev/null @@ -1,3210 +0,0 @@ -[meta] -author=Wagic Team -name=Promotional -block=Promo -[/meta] -[card] -primitive=Howlpack Alpha -id=888810052 -rarity=T -[/card] -[card] -primitive=Mayor of Avabruck -id=888810051 -rarity=S -[/card] -[card] -primitive=Ravenous Demon -id=888810053 -rarity=S -[/card] -[card] -primitive=Archdemon of Greed -id=888810054 -rarity=T -[/card] -[card] -primitive=Ajani Vengeant -id=888810038 -rarity=S -[/card] -[card] -primitive=Allosaurus Rider -id=888810030 -rarity=S -[/card] -[card] -primitive=Arena -id=97042 -rarity=S -[/card] -[card] -primitive=Avatar of Discord -id=888810029 -rarity=S -[/card] -[card] -primitive=Avatar of Hope -id=888810011 -rarity=S -[/card] -[card] -primitive=Beast of Burden -id=88881005 -rarity=S -[/card] -[card] -primitive=Bloodlord of Vaasgoth -id=888810050 -rarity=S -[/card] -[card] -primitive=Comet Storm -id=888810043 -rarity=S -[/card] -[card] -primitive=Demigod of Revenge -id=888810036 -rarity=S -[/card] -[card] -primitive=Dirtcowl Wurm -id=88881001 -rarity=S -[/card] -[card] -primitive=Djinn Illuminatus -id=888810028 -rarity=S -[/card] -[card] -primitive=Door of Destinies -id=888810035 -rarity=S -[/card] -[card] -primitive=Dragon Broodmother -id=888810040 -rarity=S -[/card] -[card] -primitive=Dragon -id=-22222220 -rarity=T -[/card] -[card] -primitive=Emrakul, the Aeons Torn -id=888810044 -rarity=S -[/card] -[card] -primitive=False Prophet -id=88881007 -rarity=S -[/card] -[card] -primitive=Feral Throwback -id=888810019 -rarity=S -[/card] -[card] -primitive=Fungal Shambler -id=888810014 -rarity=S -[/card] -[card] -primitive=Giant Badger -id=97045 -rarity=S -[/card] -[card] -primitive=Gleancrawler -id=888810027 -rarity=S -[/card] -[card] -primitive=Glissa, the Traitor -id=888810048 -rarity=S -[/card] -[card] -primitive=Glory -id=888810017 -rarity=S -[/card] -[card] -primitive=Helm of Kaldra -id=888810023 -rarity=S -[/card] -[card] -primitive=Hero of Bladehold -id=888810047 -rarity=S -[/card] -[card] -primitive=Ink-Eyes, Servant of Oni -id=888810025 -rarity=S -[/card] -[card] -primitive=Kiyomaro, First to Stand -id=888810026 -rarity=S -[/card] -[card] -primitive=Korlash Heir to Blackblade -id=888810033 -rarity=S -[/card] -[card] -primitive=Laquatus's Champion -id=888810016 -rarity=S -[/card] -[card] -primitive=Lightning Dragon -id=88881004 -rarity=S -[/card] -[card] -primitive=Lotus Bloom -id=888810031 -rarity=S -[/card] -[card] -primitive=Lu Bu, Master-at-Arms -id=88881006 -rarity=S -[/card] -[card] -primitive=Malfegor -id=888810039 -rarity=S -[/card] -[card] -primitive=Mana Crypt -id=94048 -rarity=S -[/card] -[card] -primitive=Monstrous Hound -id=88881003 -rarity=S -[/card] -[card] -primitive=Nalathni Dragon -id=97050 -rarity=S -[/card] -[card] -primitive=Oros the Avenger -id=888810032 -rarity=S -[/card] -[card] -primitive=Overbeing of Myth -id=888810037 -rarity=S -[/card] -[card] -primitive=Overtaker -id=88881009 -rarity=S -[/card] -[card] -primitive=Questing Phelddagrif -id=888810013 -rarity=S -[/card] -[card] -primitive=Raging Kavu -id=888810012 -rarity=S -[/card] -[card] -primitive=Rampaging Baloths -id=888810042 -rarity=S -[/card] -[card] -primitive=Rathi Assassin -id=888810010 -rarity=S -[/card] -[card] -primitive=Revenant -id=88881002 -rarity=S -[/card] -[card] -primitive=Ryusei, the Falling Star -id=888810024 -rarity=S -[/card] -[card] -primitive=Sewers of Estark -id=97054 -rarity=S -[/card] -[card] -primitive=Sheoldred, Whispering One -id=888810049 -rarity=S -[/card] -[card] -primitive=Shield of Kaldra -id=888810022 -rarity=S -[/card] -[card] -primitive=Silent Specter -id=888810018 -rarity=S -[/card] -[card] -primitive=Soul Collector -id=888810020 -rarity=S -[/card] -[card] -primitive=Stone-Tongue Basilisk -id=888810015 -rarity=S -[/card] -[card] -primitive=Sun Titan -id=888810045 -rarity=S -[/card] -[card] -primitive=Sword of Kaldra -id=888810021 -rarity=S -[/card] -[card] -primitive=Vampire Nocturnus -id=888810041 -rarity=S -[/card] -[card] -primitive=Windseeker Centaur -id=97057 -rarity=S -[/card] -[card] -primitive=Wren's Run Packmaster -id=888810034 -rarity=S -[/card] -[card] -primitive=Wurmcoil Engine -id=888810046 -rarity=S -[/card] -# FNM -[card] -primitive=Accumulated Knowledge -id=888820051 -rarity=S -[/card] -[card] -primitive=Albino Troll -id=888820020 -rarity=S -[/card] -[card] -primitive=Anathemancer -id=88882122 -rarity=S -[/card] -[card] -primitive=Ancient Ziggurat -id=88882118 -rarity=S -[/card] -[card] -primitive=Armadillo Cloak -id=888820069 -rarity=S -[/card] -[card] -primitive=Arrogant Wurm -id=888820077 -rarity=S -[/card] -[card] -primitive=Artisan of Kozilek -id=88882131 -rarity=S -[/card] -[card] -primitive=Astral Slide -id=888820076 -rarity=S -[/card] -[card] -primitive=Aura of Silence -id=888820026 -rarity=S -[/card] -[card] -primitive=Avalanche Riders -id=888820052 -rarity=S -[/card] -[card] -primitive=Basking Rootwalla -id=888820083 -rarity=S -[/card] -[card] -primitive=Black Knight -id=888820022 -rarity=S -[/card] -[card] -primitive=Blastoderm -id=888820059 -rarity=S -[/card] -[card] -primitive=Bloodbraid Elf -id=88882119 -rarity=S -[/card] -[card] -primitive=Bottle Gnomes -id=888820032 -rarity=S -[/card] -[card] -primitive=Brainstorm -id=888820055 -rarity=S -[/card] -[card] -primitive=Browbeat -id=88882113 -rarity=S -[/card] -[card] -primitive=Cabal Coffers -id=888820089 -rarity=S -[/card] -[card] -primitive=Cabal Therapy -id=888820060 -rarity=S -[/card] -[card] -primitive=Capsize -id=888820035 -rarity=S -[/card] -[card] -primitive=Carnophage -id=888820016 -rarity=S -[/card] -[card] -primitive=Carrion Feeder -id=888820049 -rarity=S -[/card] -[card] -primitive=Chainer's Edict -id=888820074 -rarity=S -[/card] -[card] -primitive=Circle of Protection: Red -id=888820063 -rarity=S -[/card] -[card] -primitive=Circular Logic -id=888820075 -rarity=S -[/card] -[card] -primitive=Cloudpost -id=88882120 -rarity=S -[/card] -[card] -primitive=Contagion Clasp -id=88882137 -rarity=S -[/card] -[card] -primitive=Counterspell -id=888820066 -rarity=S -[/card] -[card] -primitive=Crystalline Sliver -id=888820034 -rarity=S -[/card] -[card] -primitive=Cultivate -id=88882135 -rarity=S -[/card] -[card] -primitive=Deep Analysis -id=888820081 -rarity=S -[/card] -[card] -primitive=Desert -id=888820099 -rarity=S -[/card] -[card] -primitive=Despise -id=88882141 -rarity=S -[/card] -[card] -primitive=Disenchant -id=888820031 -rarity=S -[/card] -[card] -primitive=Dissipate -id=888820021 -rarity=S -[/card] -[card] -primitive=Drain Life -id=888820025 -rarity=S -[/card] -[card] -primitive=Duress -id=888820065 -rarity=S -[/card] -[card] -primitive=Elves of Deep Shadow -id=888820068 -rarity=S -[/card] -[card] -primitive=Elvish Visionary -id=88882121 -rarity=S -[/card] -[card] -primitive=Engineered Plague -id=888820086 -rarity=S -[/card] -[card] -primitive=Eternal Witness -id=888820094 -rarity=S -[/card] -[card] -primitive=Everflowing Chalice -id=88882128 -rarity=S -[/card] -[card] -primitive=Fact or Fiction -id=888820061 -rarity=S -[/card] -[card] -primitive=Fire // Ice -id=888820079 -rarity=S -[/card] -[card] -primitive=Fireblast -id=888820018 -rarity=S -[/card] -[card] -primitive=Firebolt -id=888820080 -rarity=S -[/card] -[card] -primitive=Fireslinger -id=888820024 -rarity=S -[/card] -[card] -primitive=Flametongue Kavu -id=888820058 -rarity=S -[/card] -[card] -primitive=Forbid -id=888820027 -rarity=S -[/card] -[card] -primitive=Force Spike -id=888820091 -rarity=S -[/card] -[card] -primitive=Gatekeeper of Malakir -id=88882126 -rarity=S -[/card] -[card] -primitive=Gerrard's Verdict -id=888820082 -rarity=S -[/card] -[card] -primitive=Ghostly Prison -id=88882117 -rarity=S -[/card] -[card] -primitive=Giant Growth -id=88882008 -rarity=S -[/card] -[card] -primitive=Glistener Elf -id=88882140 -rarity=S -[/card] -[card] -primitive=Go for the Throat -id=88882138 -rarity=S -[/card] -[card] -primitive=Goblin Bombardment -id=888820037 -rarity=S -[/card] -[card] -primitive=Goblin Legionnaire -id=888820085 -rarity=S -[/card] -[card] -primitive=Goblin Ringleader -id=888820087 -rarity=S -[/card] -[card] -primitive=Goblin Warchief -id=888820072 -rarity=S -[/card] -[card] -primitive=Icy Manipulator -id=888820067 -rarity=S -[/card] -[card] -primitive=Impulse -id=888820017 -rarity=S -[/card] -[card] -primitive=Isochron Scepter -id=88882102 -rarity=S -[/card] -[card] -primitive=Jace's Ingenuity -id=88882134 -rarity=S -[/card] -[card] -primitive=Jackal Pup -id=888820014 -rarity=S -[/card] -[card] -primitive=Juggernaut -id=888820062 -rarity=S -[/card] -[card] -primitive=Kird Ape -id=888820064 -rarity=S -[/card] -[card] -primitive=Kitchen Finks -id=88882106 -rarity=S -[/card] -[card] -primitive=Krosan Grip -id=88882123 -rarity=S -[/card] -[card] -primitive=Krosan Tusker -id=888820042 -rarity=S -[/card] -[card] -primitive=Krosan Warchief -id=888820047 -rarity=S -[/card] -[card] -primitive=Life // Death -id=888820078 -rarity=S -[/card] -[card] -primitive=Lightning Greaves -id=88882111 -rarity=S -[/card] -[card] -primitive=Lightning Rift -id=888820048 -rarity=S -[/card] -[card] -primitive=Llanowar Elves -id=888820011 -rarity=S -[/card] -[card] -primitive=Lobotomy -id=888820071 -rarity=S -[/card] -[card] -primitive=Longbow Archer -id=88882003 -rarity=S -[/card] -[card] -primitive=Magma Jet -id=88882104 -rarity=S -[/card] -[card] -primitive=Merrow Reejerey -id=88882107 -rarity=S -[/card] -[card] -primitive=Mind Warp -id=88882005 -rarity=S -[/card] -[card] -primitive=Mogg Fanatic -id=888820029 -rarity=S -[/card] -[card] -primitive=Mother of Runes -id=888820054 -rarity=S -[/card] -[card] -primitive=Mulldrifter -id=88882109 -rarity=S -[/card] -[card] -primitive=Murderous Redcap -id=88882110 -rarity=S -[/card] -[card] -primitive=Muscle Sliver -id=888820033 -rarity=S -[/card] -[card] -primitive=Myr Enforcer -id=88882105 -rarity=S -[/card] -[card] -primitive=Oblivion Ring -id=88882114 -rarity=S -[/card] -[card] -primitive=Ophidian -id=888820013 -rarity=S -[/card] -[card] -primitive=Pendelhaven -id=888820096 -rarity=S -[/card] -[card] -primitive=Priest of Titania -id=888820036 -rarity=S -[/card] -[card] -primitive=Prodigal Sorcerer -id=88882009 -rarity=S -[/card] -[card] -primitive=Qasali Pridemage -id=88882124 -rarity=S -[/card] -[card] -primitive=Quirion Ranger -id=888820015 -rarity=S -[/card] -[card] -primitive=Rancor -id=888820056 -rarity=S -[/card] -[card] -primitive=Reanimate -id=888820053 -rarity=S -[/card] -[card] -primitive=Remand -id=888820092 -rarity=S -[/card] -[card] -primitive=Resurrection -id=888820097 -rarity=S -[/card] -[card] -primitive=Rhox War Monk -id=88882133 -rarity=S -[/card] -[card] -primitive=Rift Bolt -id=88882125 -rarity=S -[/card] -[card] -primitive=River Boa -id=88882001 -rarity=S -[/card] -[card] -primitive=Roar of the Wurm -id=888820090 -rarity=S -[/card] -[card] -primitive=Sakura-Tribe Elder -id=88882115 -rarity=S -[/card] -[card] -primitive=Savage Lands -id=88882139 -rarity=S -[/card] -[card] -primitive=Scragnoth -id=888820038 -rarity=S -[/card] -[card] -primitive=Seal of Cleansing -id=888820057 -rarity=S -[/card] -[card] -primitive=Serrated Arrows -id=88882101 -rarity=S -[/card] -[card] -primitive=Shock -id=88882006 -rarity=S -[/card] -[card] -primitive=Shrapnel Blast -id=88882103 -rarity=S -[/card] -[card] -primitive=Silver Knight -id=888820046 -rarity=S -[/card] -[card] -primitive=Slice and Dice -id=888820045 -rarity=S -[/card] -[card] -primitive=Smother -id=888820039 -rarity=S -[/card] -[card] -primitive=Soltari Priest -id=888820019 -rarity=S -[/card] -[card] -primitive=Sparksmith -id=888820041 -rarity=S -[/card] -[card] -primitive=Spellstutter Sprite -id=88882129 -rarity=S -[/card] -[card] -primitive=Spike Feeder -id=888820028 -rarity=S -[/card] -[card] -primitive=Squadron Hawk -id=88882132 -rarity=S -[/card] -[card] -primitive=Staunch Defenders -id=88882007 -rarity=S -[/card] -[card] -primitive=Stone Rain -id=888820010 -rarity=S -[/card] -[card] -primitive=Swords to Plowshares -id=888820012 -rarity=S -[/card] -[card] -primitive=Teetering Peaks -id=88882136 -rarity=S -[/card] -[card] -primitive=Tendrils of Agony -id=888820095 -rarity=S -[/card] -[card] -primitive=Terminate -id=888820070 -rarity=S -[/card] -[card] -primitive=Terror -id=88882002 -rarity=S -[/card] -[card] -primitive=Thirst for Knowledge -id=88882100 -rarity=S -[/card] -[card] -primitive=Tidehollow Sculler -id=88882116 -rarity=S -[/card] -[card] -primitive=Tormod's Crypt -id=888820093 -rarity=S -[/card] -[card] -primitive=Treetop Village -id=888820050 -rarity=S -[/card] -[card] -primitive=Volcanic Geyser -id=88882004 -rarity=S -[/card] -[card] -primitive=Wall of Blossoms -id=888820023 -rarity=S -[/card] -[card] -primitive=Wall of Omens -id=88882130 -rarity=S -[/card] -[card] -primitive=Wall of Roots -id=888820098 -rarity=S -[/card] -[card] -primitive=Watchwolf -id=88882112 -rarity=S -[/card] -[card] -primitive=Whipcorder -id=888820040 -rarity=S -[/card] -[card] -primitive=White Knight -id=888820030 -rarity=S -[/card] -[card] -primitive=Wild Mongrel -id=888820073 -rarity=S -[/card] -[card] -primitive=Wild Nacatl -id=88882127 -rarity=S -[/card] -[card] -primitive=Willbender -id=888820044 -rarity=S -[/card] -[card] -primitive=Wing Shards -id=888820088 -rarity=S -[/card] -[card] -primitive=Withered Wretch -id=888820043 -rarity=S -[/card] -[card] -primitive=Wonder -id=888820084 -rarity=S -[/card] -[card] -primitive=Wren's Run Vanquisher -id=88882108 -rarity=S -[/card] -# CHAMPS -[card] -primitive=Blood Knight -id=88883007 -rarity=S -[/card] -[card] -primitive=Bramblewood Paragon -id=888830011 -rarity=S -[/card] -[card] -primitive=Doran, the Siege Tower -id=888830010 -rarity=S -[/card] -[card] -primitive=Electrolyze -id=88883001 -rarity=S -[/card] -[card] -primitive=Groundbreaker -id=88883008 -rarity=S -[/card] -[card] -primitive=Imperious Perfect -id=88883009 -rarity=S -[/card] -[card] -primitive=Mutavault -id=888830012 -rarity=S -[/card] -[card] -primitive=Niv-Mizzet, the Firemind -id=88883002 -rarity=S -[/card] -[card] -primitive=Rakdos Guildmage -id=88883003 -rarity=S -[/card] -[card] -primitive=Serra Avenger -id=88883006 -rarity=S -[/card] -[card] -primitive=Urza's Factory -id=88883005 -rarity=S -[/card] -[card] -primitive=Voidslime -id=88883004 -rarity=S -[/card] -# WPN Gateway -[card] -primitive=Auramancer -id=888840077 -rarity=S -[/card] -[card] -primitive=Bloodcrazed Neonate -id=888840083 -rarity=S -[/card] -[card] -primitive=Boggart Ram-Gang -id=888840017 -rarity=S -[/card] -[card] -primitive=Boneyard Wurm -id=888840084 -rarity=S -[/card] -[card] -primitive=Boomerang -id=88884004 -rarity=S -[/card] -[card] -primitive=Calciderm -id=88884005 -rarity=S -[/card] -[card] -primitive=Cenn's Tactician -id=888840014 -rarity=S -[/card] -[card] -primitive=Circle of Flame -id=888840078 -rarity=S -[/card] -[card] -primitive=Curse of Thirst -id=888840081 -rarity=S -[/card] -[card] -primitive=Curse of Wizardry -id=888840047 -rarity=S -[/card] -[card] -primitive=Curse of the Bloody Tome -id=888840080 -rarity=S -[/card] -[card] -primitive=Dauntless Dourbark -id=888840012 -rarity=S -[/card] -[card] -primitive=Deathless Angel -id=888840049 -rarity=S -[/card] -[card] -primitive=Duergar Hedge-Mage -id=888840019 -rarity=S -[/card] -[card] -primitive=Emeria Angel -id=888840035 -rarity=S -[/card] -[card] -primitive=Fiery Temper -id=88884003 -rarity=S -[/card] -[card] -primitive=Fling -id=888840050 -rarity=S -[/card] -#[card] -#primitive=Gather the Townsfolk -#id=888840079 -#rarity=S -#[/card] -[card] -primitive=Golem's Heart -id=888840060 -rarity=S -[/card] -[card] -primitive=Gravedigger -id=888840016 -rarity=S -[/card] -[card] -primitive=Hada Freeblade -id=888840038 -rarity=S -[/card] -[card] -primitive=Hellspark Elemental -id=888840025 -rarity=S -[/card] -[card] -primitive=Icatian Javelineers -id=88884002 -rarity=S -[/card] -[card] -primitive=Kalastria Highborn -id=888840039 -rarity=S -[/card] -[card] -primitive=Kor Duelist -id=888840032 -rarity=S -[/card] -[card] -primitive=Kor Firewalker -id=888840036 -rarity=S -[/card] -[card] -primitive=Lava Axe -id=888840013 -rarity=S -[/card] -[card] -primitive=Leatherback Baloth -id=888840037 -rarity=S -[/card] -[card] -primitive=Llanowar Elves -id=88884009 -rarity=S -[/card] -[card] -primitive=Marisi's Twinclaws -id=888840026 -rarity=S -[/card] -[card] -primitive=Master's Call -id=888840064 -rarity=S -[/card] -[card] -primitive=Maul Splicer -id=888840072 -rarity=S -[/card] -[card] -primitive=Mind Control -id=888840030 -rarity=S -[/card] -[card] -primitive=Mind Stone -id=888840011 -rarity=S -[/card] -[card] -primitive=Mogg Fanatic -id=888840010 -rarity=S -[/card] -[card] -primitive=Mycoid Shepherd -id=888840028 -rarity=S -[/card] -[card] -primitive=Naya Sojourners -id=888840029 -rarity=S -[/card] -#[card] -#primitive=Nearheath Stalker -#id=888840082 -#rarity=S -#[/card] -[card] -primitive=Nissa's Chosen -id=888840034 -rarity=S -[/card] -[card] -primitive=Oona's Blackguard -id=888840015 -rarity=S -[/card] -[card] -primitive=Path to Exile -id=888840024 -rarity=S -[/card] -[card] -primitive=Pathrazer of Ulamog -id=888840046 -rarity=S -[/card] -[card] -primitive=Plague Myr -id=888840065 -rarity=S -[/card] -[card] -primitive=Plague Stinger -id=888840059 -rarity=S -[/card] -[card] -primitive=Reckless Wurm -id=88884006 -rarity=S -[/card] -[card] -primitive=Rise from the Grave -id=888840031 -rarity=S -[/card] -[card] -primitive=Selkie Hedge-Mage -id=888840020 -rarity=S -[/card] -[card] -primitive=Shrine of Burning Rage -id=888840073 -rarity=S -[/card] -[card] -primitive=Signal Pest -id=888840066 -rarity=S -[/card] -[card] -primitive=Skinrender -id=888840063 -rarity=S -[/card] -[card] -primitive=Slave of Bolas -id=888840027 -rarity=S -[/card] -[card] -primitive=Sprouting Thrinax -id=888840021 -rarity=S -[/card] -[card] -primitive=Staggershock -id=888840048 -rarity=S -[/card] -[card] -primitive=Sylvan Ranger -id=888840051 -rarity=S -[/card] -[card] -primitive=Syphon Mind -id=888840040 -rarity=S -[/card] -[card] -primitive=Tormented Soul -id=888840076 -rarity=S -[/card] -[card] -primitive=Vampire Nighthawk -id=888840033 -rarity=S -[/card] -[card] -primitive=Vault Skirge -id=888840071 -rarity=S -[/card] -[card] -primitive=Wilt-Leaf Cavaliers -id=888840018 -rarity=S -[/card] -[card] -primitive=Wood Elves -id=88884001 -rarity=S -[/card] -[card] -primitive=Woolly Thoctar -id=888840022 -rarity=S -[/card] -[card] -primitive=Yixlid Jailer -id=88884007 -rarity=S -[/card] -[card] -primitive=Zoetic Cavern -id=88884008 -rarity=S -[/card] -# Game Day Cards -[card] -primitive=Black Sun's Zenith -id=88885007 -rarity=S -[/card] -[card] -primitive=Diregraf Ghoul -id=888850012 -rarity=S -[/card] -[card] -primitive=Dungrove Elder -id=888850011 -rarity=S -[/card] -[card] -primitive=Elite Inquisitor -id=888850013 -rarity=S -[/card] -[card] -primitive=Liliana's Specter -id=88885002 -rarity=S -[/card] -[card] -primitive=Memnite -id=88885004 -rarity=S -[/card] -[card] -primitive=Mitotic Slime -id=88885003 -rarity=S -[/card] -[card] -primitive=Ooze T1 -id=66666666 -rarity=T -[/card] -[card] -primitive=Ooze T2 -id=77777777 -rarity=T -[/card] -[card] -primitive=Myr Superion -id=88885008 -rarity=S -[/card] -[card] -primitive=Priest of Urabrask -id=88885009 -rarity=S -[/card] -[card] -primitive=Pristine Talisman -id=888850017 -rarity=S -[/card] -[card] -primitive=Reya Dawnbringer -id=88885001 -rarity=S -[/card] -[card] -primitive=Stormblood Berserker -id=888850010 -rarity=S -[/card] -[card] -primitive=Strangleroot Geist -id=888850015 -rarity=S -[/card] -[card] -primitive=Suture Priest -id=888850016 -rarity=S -[/card] -[card] -primitive=Tempered Steel -id=88885005 -rarity=S -[/card] -[card] -primitive=Treasure Mage -id=88885006 -rarity=S -[/card] -[card] -primitive=Zombie Apocalypse -id=888850014 -rarity=S -[/card] -# APAC LANDS -[card] -primitive=Forest -id=8889991 -rarity=S -[/card] -[card] -primitive=Forest -id=8889996 -rarity=S -[/card] -[card] -primitive=Forest -id=88899911 -rarity=S -[/card] -[card] -primitive=Island -id=8889992 -rarity=S -[/card] -[card] -primitive=Island -id=8889997 -rarity=S -[/card] -[card] -primitive=Island -id=88899912 -rarity=S -[/card] -[card] -primitive=Mountain -id=8889993 -rarity=S -[/card] -[card] -primitive=Mountain -id=8889998 -rarity=S -[/card] -[card] -primitive=Mountain -id=88899913 -rarity=S -[/card] -[card] -primitive=Plains -id=8889994 -rarity=S -[/card] -[card] -primitive=Plains -id=8889999 -rarity=S -[/card] -[card] -primitive=Plains -id=88899914 -rarity=S -[/card] -[card] -primitive=Swamp -id=8889995 -rarity=S -[/card] -[card] -primitive=Swamp -id=88899910 -rarity=S -[/card] -[card] -primitive=Swamp -id=88899915 -rarity=S -[/card] -# EURO LANDS -[card] -primitive=Forest -id=8889981 -rarity=S -[/card] -[card] -primitive=Forest -id=8889986 -rarity=S -[/card] -[card] -primitive=Forest -id=88899811 -rarity=S -[/card] -[card] -primitive=Island -id=8889982 -rarity=S -[/card] -[card] -primitive=Island -id=8889987 -rarity=S -[/card] -[card] -primitive=Island -id=88899812 -rarity=S -[/card] -[card] -primitive=Mountain -id=8889983 -rarity=S -[/card] -[card] -primitive=Mountain -id=8889988 -rarity=S -[/card] -[card] -primitive=Mountain -id=88899813 -rarity=S -[/card] -[card] -primitive=Plains -id=8889984 -rarity=S -[/card] -[card] -primitive=Plains -id=8889989 -rarity=S -[/card] -[card] -primitive=Plains -id=88899814 -rarity=S -[/card] -[card] -primitive=Swamp -id=8889985 -rarity=S -[/card] -[card] -primitive=Swamp -id=88899810 -rarity=S -[/card] -[card] -primitive=Swamp -id=88899815 -rarity=S -[/card] -# GURU LANDS -[card] -primitive=Forest -id=8889971 -rarity=S -[/card] -[card] -primitive=Island -id=8889972 -rarity=S -[/card] -[card] -primitive=Mountain -id=8889973 -rarity=S -[/card] -[card] -primitive=Plains -id=8889974 -rarity=S -[/card] -[card] -primitive=Swamp -id=8889975 -rarity=S -[/card] -# Magic Player Rewards -[card] -primitive=Bituminous Blast -id=77788846 -rarity=S -[/card] -[card] -primitive=Blightning -id=77788836 -rarity=S -[/card] -[card] -primitive=Brave the Elements -id=77788850 -rarity=S -[/card] -[card] -primitive=Burst Lightning -id=77788847 -rarity=S -[/card] -[card] -primitive=Cancel -id=77788841 -rarity=S -[/card] -[card] -primitive=Celestial Purge -id=77788845 -rarity=S -[/card] -[card] -primitive=Condemn -id=77788818 -rarity=S -[/card] -[card] -primitive=Corrupt -id=77788830 -rarity=S -[/card] -[card] -primitive=Cruel Edict -id=77788821 -rarity=S -[/card] -[card] -primitive=Cryptic Command -id=77788831 -rarity=S -[/card] -[card] -primitive=Damnation -id=77788824 -rarity=S -[/card] -[card] -primitive=Day of Judgment -id=77788849 -rarity=S -[/card] -[card] -primitive=Disenchant -id=77788822 -rarity=S -[/card] -[card] -primitive=Doom Blade -id=77788851 -rarity=S -[/card] -[card] -primitive=Fireball -id=7778886 -rarity=S -[/card] -[card] -primitive=Flame Javelin -id=77788832 -rarity=S -[/card] -[card] -primitive=Giant Growth -id=77788813 -rarity=S -[/card] -[card] -primitive=Harmonize -id=77788828 -rarity=S -[/card] -[card] -primitive=Harrow -id=77788848 -rarity=S -[/card] -[card] -primitive=Hinder -id=77788811 -rarity=S -[/card] -[card] -primitive=Hypnotic Specter -id=77788810 -rarity=S -[/card] -[card] -primitive=Incinerate -id=77788826 -rarity=S -[/card] -[card] -primitive=Infest -id=77788843 -rarity=S -[/card] -[card] -primitive=Lightning Bolt -id=77788840 -rarity=S -[/card] -[card] -primitive=Lightning Helix -id=77788816 -rarity=S -[/card] -[card] -primitive=Mana Leak -id=7778888 -rarity=S -[/card] -[card] -primitive=Mana Tithe -id=77788827 -rarity=S -[/card] -[card] -primitive=Mortify -id=77788819 -rarity=S -[/card] -[card] -primitive=Nameless Inversion -id=77788834 -rarity=S -[/card] -[card] -primitive=Negate -id=77788838 -rarity=S -[/card] -[card] -primitive=Oxidize -id=7778887 -rarity=S -[/card] -[card] -primitive=Ponder -id=77788829 -rarity=S -[/card] -[card] -primitive=Powder Keg -id=7778883 -rarity=S -[/card] -[card] -primitive=Psionic Blast -id=77788820 -rarity=S -[/card] -[card] -primitive=Psychatog -id=7778884 -rarity=S -[/card] -[card] -primitive=Putrefy -id=77788814 -rarity=S -[/card] -[card] -primitive=Pyroclasm -id=77788812 -rarity=S -[/card] -[card] -primitive=Rampant Growth -id=77788837 -rarity=S -[/card] -[card] -primitive=Reciprocate -id=7778889 -rarity=S -[/card] -[card] -primitive=Recollect -id=77788823 -rarity=S -[/card] -[card] -primitive=Remove Soul -id=77788835 -rarity=S -[/card] -[card] -primitive=Searing Blaze -id=77788853 -rarity=S -[/card] -[card] -primitive=Sign in Blood -id=77788842 -rarity=S -[/card] -[card] -primitive=Terminate -id=77788839 -rarity=S -[/card] -[card] -primitive=Terror -id=7778885 -rarity=S -[/card] -[card] -primitive=Tidings -id=77788825 -rarity=S -[/card] -[card] -primitive=Treasure Hunt -id=77788852 -rarity=S -[/card] -[card] -primitive=Unmake -id=77788833 -rarity=S -[/card] -[card] -primitive=Voidmage Prodigy -id=7778882 -rarity=S -[/card] -[card] -primitive=Volcanic Fallout -id=77788844 -rarity=S -[/card] -[card] -primitive=Wasteland -id=7778881 -rarity=S -[/card] -[card] -primitive=Wrath of God -id=77788817 -rarity=S -[/card] -[card] -primitive=Zombify -id=77788815 -rarity=S -[/card] -# JGC -[card] -primitive=Argothian Enchantress -id=77788712 -rarity=S -[/card] -[card] -primitive=Armageddon -id=77788714 -rarity=S -[/card] -[card] -primitive=Balance -id=77788715 -rarity=S -[/card] -[card] -primitive=Ball Lightning -id=7778877 -rarity=S -[/card] -[card] -primitive=Bitterblossom -id=77788759 -rarity=S -[/card] -[card] -primitive=Bloodstained Mire -id=77788743 -rarity=S -[/card] -[card] -primitive=Burning Wish -id=77788742 -rarity=S -[/card] -[card] -primitive=Counterspell -id=7778875 -rarity=S -[/card] -[card] -primitive=Cunning Wish -id=77788729 -rarity=S -[/card] -[card] -primitive=Dark Confidant -id=77788761 -rarity=S -[/card] -[card] -primitive=Dark Ritual -id=77788738 -rarity=S -[/card] -[card] -primitive=Decree of Justice -id=77788732 -rarity=S -[/card] -[card] -primitive=Demonic Tutor -id=77788735 -rarity=S -[/card] -[card] -primitive=Deranged Hermit -id=77788718 -rarity=S -[/card] -[card] -primitive=Doubling Season -id=77788762 -rarity=S -[/card] -[card] -primitive=Exalted Angel -id=77788724 -rarity=S -[/card] -[card] -primitive=Flooded Strand -id=77788744 -rarity=S -[/card] -[card] -primitive=Flusterstorm -id=77788765 -rarity=S -[/card] -[card] -primitive=Gaea's Cradle -id=7778873 -rarity=S -[/card] -[card] -primitive=Gemstone Mine -id=77788720 -rarity=S -[/card] -[card] -primitive=Goblin Piledriver -id=77788736 -rarity=S -[/card] -[card] -primitive=Goblin Welder -id=77788763 -rarity=S -[/card] -[card] -primitive=Grim Lavamancer -id=77788725 -rarity=S -[/card] -[card] -primitive=Hammer of Bogardan -id=7778879 -rarity=S -[/card] -[card] -primitive=Hermit Druid -id=77788719 -rarity=S -[/card] -[card] -primitive=Intuition -id=77788711 -rarity=S -[/card] -[card] -primitive=Karmic Guide -id=77788767 -rarity=S -[/card] -[card] -primitive=Land Tax -id=77788752 -rarity=S -[/card] -[card] -primitive=Lightning Bolt -id=7778871 -rarity=S -[/card] -[card] -primitive=Living Death -id=77788713 -rarity=S -[/card] -[card] -primitive=Living Wish -id=77788737 -rarity=S -[/card] -[card] -primitive=Mana Crypt -id=77788760 -rarity=S -[/card] -[card] -primitive=Maze of Ith -id=77788739 -rarity=S -[/card] -[card] -primitive=Meddling Mage -id=77788726 -rarity=S -[/card] -[card] -primitive=Memory Lapse -id=7778874 -rarity=S -[/card] -[card] -primitive=Mind's Desire -id=77788734 -rarity=S -[/card] -[card] -primitive=Mishra's Factory -id=77788723 -rarity=S -[/card] -[card] -primitive=Morphling -id=77788753 -rarity=S -[/card] -[card] -primitive=Natural Order -id=77788749 -rarity=S -[/card] -[card] -primitive=Oath of Druids -id=7778878 -rarity=S -[/card] -[card] -primitive=Orim's Chant -id=77788733 -rarity=S -[/card] -[card] -primitive=Pernicious Deed -id=77788727 -rarity=S -[/card] -[card] -primitive=Phyrexian Dreadnought -id=77788750 -rarity=S -[/card] -[card] -primitive=Phyrexian Negator -id=77788717 -rarity=S -[/card] -[card] -primitive=Polluted Delta -id=77788745 -rarity=S -[/card] -[card] -primitive=Ravenous Baloth -id=77788728 -rarity=S -[/card] -[card] -primitive=Regrowth -id=77788721 -rarity=S -[/card] -[card] -primitive=Sinkhole -id=77788748 -rarity=S -[/card] -[card] -primitive=Sol Ring -id=77788722 -rarity=S -[/card] -[card] -primitive=Stifle -id=77788740 -rarity=S -[/card] -[card] -primitive=Stroke of Genius -id=7778872 -rarity=S -[/card] -[card] -primitive=Survival of the Fittest -id=77788741 -rarity=S -[/card] -[card] -primitive=Sword of Fire and Ice -id=77788757 -rarity=S -[/card] -#[card] -#primitive=Sword of Light and Shadow -#id=77788770 -#rarity=S -#[/card] -[card] -primitive=Thawing Glaciers -id=77788751 -rarity=S -[/card] -[card] -primitive=Time Warp -id=77788716 -rarity=S -[/card] -[card] -primitive=Tradewind Rider -id=77788710 -rarity=S -[/card] -[card] -primitive=Vampiric Tutor -id=7778876 -rarity=S -[/card] -[card] -primitive=Vendilion Clique -id=77788758 -rarity=S -[/card] -[card] -primitive=Vindicate -id=77788731 -rarity=S -[/card] -[card] -primitive=Wasteland -id=77788755 -rarity=S -[/card] -[card] -primitive=Wheel of Fortune -id=77788754 -rarity=S -[/card] -[card] -primitive=Windswept Heath -id=77788746 -rarity=S -[/card] -[card] -primitive=Wooded Foothills -id=77788747 -rarity=S -[/card] -[card] -primitive=Xiahou Dun, the One-Eyed -id=77788764 -rarity=S -[/card] -[card] -primitive=Yawgmoth's Will -id=77788730 -rarity=S -[/card] -# Grand Prix -[card] -primitive=Call of the Herd -id=7778862 -rarity=S -[/card] -[card] -primitive=Chrome Mox -id=7778863 -rarity=S -[/card] -#[card] -#primitive=Goblin Guide -#id=7778866 -#rarity=S -#[/card] -[card] -primitive=Maelstrom Pulse -id=7778865 -rarity=S -[/card] -[card] -primitive=Spiritmonger -id=7778861 -rarity=S -[/card] -[card] -primitive=Umezawa's Jitte -id=7778864 -rarity=S -[/card] -# Arena League -[card] -primitive=Arc Lightning -id=77788542 -rarity=S -[/card] -[card] -primitive=Ashnod's Coupon -id=77788566 -rarity=S -[/card] -[card] -primitive=Bonesplitter -id=77788552 -rarity=S -[/card] -[card] -primitive=Booster Tutor -id=77788563 -rarity=S -[/card] -[card] -primitive=Castigate -id=77788580 -rarity=S -[/card] -[card] -primitive=Chill -id=77788519 -rarity=S -[/card] -[card] -primitive=Circle of Protection: Art -id=77788561 -rarity=S -[/card] -[card] -primitive=Coiling Oracle -id=77788582 -rarity=S -[/card] -[card] -primitive=Creeping Mold -id=77788528 -rarity=S -[/card] -[card] -primitive=Darksteel Ingot -id=77788558 -rarity=S -[/card] -[card] -primitive=Dauthi Slayer -id=77788543 -rarity=S -[/card] -[card] -primitive=Diabolic Edict -id=77788537 -rarity=S -[/card] -[card] -primitive=Disenchant -id=7778856 -rarity=S -[/card] -[card] -primitive=Dismiss -id=77788529 -rarity=S -[/card] -[card] -primitive=Duress -id=77788517 -rarity=S -[/card] -[card] -primitive=Elvish Aberration -id=77788551 -rarity=S -[/card] -[card] -primitive=Empyrial Armor -id=77788531 -rarity=S -[/card] -[card] -primitive=Enlightened Tutor -id=77788521 -rarity=S -[/card] -[card] -primitive=Fireball -id=7778857 -rarity=S -[/card] -[card] -primitive=Fling -id=77788530 -rarity=S -[/card] -[card] -primitive=Forest -id=7778855 -rarity=S -[/card] -[card] -primitive=Forest -id=77788512 -rarity=S -[/card] -[card] -primitive=Forest -id=77788527 -rarity=S -[/card] -[card] -primitive=Forest -id=77788536 -rarity=S -[/card] -[card] -primitive=Forest -id=77788540 -rarity=S -[/card] -[card] -primitive=Forest -id=77788549 -rarity=S -[/card] -[card] -primitive=Forest -id=77788557 -rarity=S -[/card] -[card] -primitive=Forest -id=77788571 -rarity=S -[/card] -[card] -primitive=Forest -id=77788579 -rarity=S -[/card] -[card] -primitive=Gaea's Blessing -id=77788538 -rarity=S -[/card] -[card] -primitive=Genju of the Spires -id=77788572 -rarity=S -[/card] -[card] -primitive=Glacial Ray -id=77788560 -rarity=S -[/card] -[card] -primitive=Goblin Mime -id=77788564 -rarity=S -[/card] -[card] -primitive=Granny's Payback -id=77788565 -rarity=S -[/card] -[card] -primitive=Island -id=7778852 -rarity=S -[/card] -[card] -primitive=Island -id=7778859 -rarity=S -[/card] -[card] -primitive=Island -id=77788524 -rarity=S -[/card] -[card] -primitive=Island -id=77788533 -rarity=S -[/card] -[card] -primitive=Island -id=77788539 -rarity=S -[/card] -[card] -primitive=Island -id=77788546 -rarity=S -[/card] -[card] -primitive=Island -id=77788554 -rarity=S -[/card] -[card] -primitive=Island -id=77788568 -rarity=S -[/card] -[card] -primitive=Island -id=77788576 -rarity=S -[/card] -[card] -primitive=Karn, Silver Golem -id=77788516 -rarity=S -[/card] -[card] -primitive=Man-o'-War -id=77788541 -rarity=S -[/card] -[card] -primitive=Mana Leak -id=77788544 -rarity=S -[/card] -[card] -primitive=Mise -id=77788562 -rarity=S -[/card] -[card] -primitive=Mountain -id=7778854 -rarity=S -[/card] -[card] -primitive=Mountain -id=77788511 -rarity=S -[/card] -[card] -primitive=Mountain -id=77788526 -rarity=S -[/card] -[card] -primitive=Mountain -id=77788535 -rarity=S -[/card] -[card] -primitive=Mountain -id=77788548 -rarity=S -[/card] -[card] -primitive=Mountain -id=77788556 -rarity=S -[/card] -[card] -primitive=Mountain -id=77788570 -rarity=S -[/card] -[card] -primitive=Mountain -id=77788578 -rarity=S -[/card] -[card] -primitive=Okina Nightwatch -id=77788573 -rarity=S -[/card] -[card] -primitive=Pillage -id=77788520 -rarity=S -[/card] -[card] -primitive=Plains -id=7778851 -rarity=S -[/card] -[card] -primitive=Plains -id=7778858 -rarity=S -[/card] -[card] -primitive=Plains -id=77788523 -rarity=S -[/card] -[card] -primitive=Plains -id=77788532 -rarity=S -[/card] -[card] -primitive=Plains -id=77788545 -rarity=S -[/card] -[card] -primitive=Plains -id=77788553 -rarity=S -[/card] -[card] -primitive=Plains -id=77788567 -rarity=S -[/card] -[card] -primitive=Plains -id=77788575 -rarity=S -[/card] -[card] -primitive=Pouncing Jaguar -id=77788513 -rarity=S -[/card] -[card] -primitive=Rewind -id=77788515 -rarity=S -[/card] -[card] -primitive=Serum Visions -id=77788559 -rarity=S -[/card] -[card] -primitive=Skirk Marauder -id=77788550 -rarity=S -[/card] -[card] -primitive=Skittering Skirge -id=77788514 -rarity=S -[/card] -[card] -primitive=Skyknight Legionnaire -id=77788574 -rarity=S -[/card] -[card] -primitive=Stupor -id=77788522 -rarity=S -[/card] -[card] -primitive=Surging Flame -id=77788583 -rarity=S -[/card] -[card] -primitive=Swamp -id=7778853 -rarity=S -[/card] -[card] -primitive=Swamp -id=77788510 -rarity=S -[/card] -[card] -primitive=Swamp -id=77788525 -rarity=S -[/card] -[card] -primitive=Swamp -id=77788534 -rarity=S -[/card] -[card] -primitive=Swamp -id=77788547 -rarity=S -[/card] -[card] -primitive=Swamp -id=77788555 -rarity=S -[/card] -[card] -primitive=Swamp -id=77788569 -rarity=S -[/card] -[card] -primitive=Swamp -id=77788577 -rarity=S -[/card] -[card] -primitive=Uktabi Orangutan -id=77788518 -rarity=S -[/card] -[card] -primitive=Wee Dragonauts -id=77788581 -rarity=S -[/card] -# PRO TOUR -[card] -primitive=Ajani Goldmane -id=7778845 -rarity=S -[/card] -[card] -primitive=Avatar of Woe -id=7778844 -rarity=S -[/card] -[card] -primitive=Eternal Dragon -id=7778841 -rarity=S -[/card] -[card] -primitive=Mirari's Wake -id=7778842 -rarity=S -[/card] -[card] -primitive=Treva the Renewer -id=7778843 -rarity=S -[/card] -# 15th Anniversary -[card] -primitive=Char -id=7778831 -rarity=S -[/card] -[card] -primitive=Kamahl, Pit Fighter -id=7778832 -rarity=S -[/card] -# Release Events -[card] -primitive=*** Whuppin' -id=7778822 -rarity=S -[/card] -[card] -primitive=Azorius Guildmage -id=7778829 -rarity=S -[/card] -[card] -primitive=Budoka Pupil -id=7778823 -rarity=S -[/card] -[card] -primitive=Ichiga, Who Topples Oaks -id=77788214 -rarity=T -[/card] -[card] -primitive=Dimir Guildmage -id=7778827 -rarity=S -[/card] -[card] -primitive=Force of Nature -id=7778825 -rarity=S -[/card] -[card] -primitive=Ghost-Lit Raider -id=7778824 -rarity=S -[/card] -[card] -primitive=Gruul Guildmage -id=7778828 -rarity=S -[/card] -[card] -primitive=Hedge Troll -id=77788211 -rarity=S -[/card] -[card] -primitive=Rukh Egg -id=7778821 -rarity=S -[/card] -[card] -primitive=Shivan Dragon -id=7778826 -rarity=S -[/card] -[card] -primitive=Shriekmaw -id=77788213 -rarity=S -[/card] -[card] -primitive=Storm Entity -id=77788212 -rarity=S -[/card] -[card] -primitive=Sudden Shock -id=77788210 -rarity=S -[/card] -# Launch Parties -[card] -primitive=Ancient Hellkite -id=6668881 -rarity=S -[/card] -[card] -primitive=Ant Queen -id=6668882 -rarity=S -[/card] -[card] -primitive=Earwig Squad -id=6668883 -rarity=S -[/card] -[card] -primitive=Figure of Destiny -id=6668884 -rarity=S -[/card] -[card] -primitive=Garruk's Horde -id=6668885 -rarity=S -[/card] -[card] -primitive=Joraga Warcaller -id=6668886 -rarity=S -[/card] -[card] -primitive=Knight of New Alara -id=6668887 -rarity=S -[/card] -[card] -primitive=Lord of Shatterskull Pass -id=6668888 -rarity=S -[/card] -[card] -primitive=Obelisk of Alara -id=6668889 -rarity=S -[/card] -[card] -primitive=Phyrexian Metamorph -id=66688810 -rarity=S -[/card] -[card] -primitive=Steel Hellkite -id=66688811 -rarity=S -[/card] -[card] -primitive=Thopter Assembly -id=66688812 -rarity=S -[/card] -[card] -primitive=Valakut, the Molten Pinnacle -id=66688813 -rarity=S -[/card] -[card] -primitive=Vexing Shusher -id=66688814 -rarity=S -[/card] -[card] -primitive=Ludevic's Test Subject -id=66688815 -rarity=S -[/card] -[card] -primitive=Ludevic's Abomination -id=66688816 -rarity=T -[/card] -[card] -primitive=Mondronen Shaman -id=66688817 -rarity=S -[/card] -[card] -primitive=Tovolar's Magehunter -id=66688818 -rarity=T -[/card] -# Media Inserts -[card] -primitive=Birds of Paradise -id=5558881 -rarity=S -[/card] -[card] -primitive=Bloodthrone Vampire -id=5558882 -rarity=S -[/card] -[card] -primitive=Blue Elemental Blast -id=5558883 -rarity=S -[/card] -[card] -primitive=Brion Stoutarm -id=5558884 -rarity=S -[/card] -[card] -primitive=Broodmate Dragon -id=5558885 -rarity=S -[/card] -[card] -primitive=Celestial Colonnade -id=5558886 -rarity=S -[/card] -[card] -primitive=Chandra's Phoenix -id=5558887 -rarity=S -[/card] -[card] -primitive=Day of Judgment -id=5558888 -rarity=S -[/card] -[card] -primitive=Devil's Play -id=5558889 -rarity=S -[/card] -[card] -primitive=Electrolyze -id=55588810 -rarity=S -[/card] -[card] -primitive=Faithless Looting -id=55588811 -rarity=S -[/card] -[card] -primitive=Feast of Blood -id=55588812 -rarity=S -[/card] -[card] -primitive=Fireball -id=55588813 -rarity=S -[/card] -[card] -primitive=Frost Titan -id=55588814 -rarity=S -[/card] -[card] -primitive=Garruk Wildspeaker -id=55588815 -rarity=S -[/card] -[card] -primitive=Grave Titan -id=55588816 -rarity=S -[/card] -[card] -primitive=Gravecrawler -id=55588817 -rarity=S -[/card] -[card] -primitive=Guul Draz Assassin -id=55588818 -rarity=S -[/card] -[card] -primitive=Honor of the Pure -id=55588819 -rarity=S -[/card] -[card] -primitive=Inferno Titan -id=55588820 -rarity=S -[/card] -[card] -primitive=Jace Beleren -id=55588821 -rarity=S -[/card] -[card] -primitive=Jaya Ballard, Task Mage -id=55588822 -rarity=S -[/card] -[card] -primitive=Kor Skyfisher -id=55588823 -rarity=S -[/card] -[card] -primitive=Lightning Hounds -id=55588824 -rarity=S -[/card] -[card] -primitive=Liliana Vess -id=55588825 -rarity=S -[/card] -[card] -primitive=Memoricide -id=55588826 -rarity=S -[/card] -[card] -primitive=Mirran Crusader -id=55588827 -rarity=S -[/card] -[card] -primitive=Nissa Revane -id=55588828 -rarity=S -[/card] -[card] -primitive=Phyrexian Rager -id=55588829 -rarity=S -[/card] -[card] -primitive=Retaliator Griffin -id=55588830 -rarity=S -[/card] -[card] -primitive=Scent of Cinder -id=55588831 -rarity=S -[/card] -[card] -primitive=Silver Drake -id=55588832 -rarity=S -[/card] -[card] -primitive=Spined Wurm -id=55588833 -rarity=S -[/card] -[card] -primitive=Steward of Valeron -id=55588834 -rarity=S -[/card] -[card] -primitive=Surgical Extraction -id=55588835 -rarity=S -[/card] -[card] -primitive=Treasure Hunt -id=55588836 -rarity=S -[/card] -[card] -primitive=Warmonger -id=55588837 -rarity=S -[/card] -# Super Series -[card] -primitive=City of Brass -id=5558871 -rarity=S -[/card] -[card] -primitive=Crusade -id=5558872 -rarity=S -[/card] -[card] -primitive=Elvish Champion -id=5558873 -rarity=S -[/card] -[card] -primitive=Elvish Lyrist -id=5558874 -rarity=S -[/card] -[card] -primitive=Giant Growth -id=5558875 -rarity=S -[/card] -[card] -primitive=Glorious Anthem -id=5558876 -rarity=S -[/card] -[card] -primitive=Lord of Atlantis -id=5558877 -rarity=S -[/card] -[card] -primitive=Mad Auntie -id=5558878 -rarity=S -[/card] -[card] -primitive=Royal Assassin -id=5558879 -rarity=S -[/card] -[card] -primitive=Sakura-Tribe Elder -id=55588710 -rarity=S -[/card] -[card] -primitive=Serra Avatar -id=55588711 -rarity=S -[/card] -[card] -primitive=Shard Phoenix -id=55588712 -rarity=S -[/card] -[card] -primitive=Slith Firewalker -id=55588713 -rarity=S -[/card] -[card] -primitive=Soltari Priest -id=55588714 -rarity=S -[/card] -[card] -primitive=Thran Quarry -id=55588715 -rarity=S -[/card] -[card] -primitive=Two-Headed Dragon -id=55588716 -rarity=S -[/card] -[card] -primitive=Volcanic Hammer -id=55588717 -rarity=S -[/card] -[card] -primitive=Whirling Dervish -id=55588718 -rarity=S -[/card] -# Summer of Magic -[card] -primitive=Faerie Conclave -id=5558861 -rarity=S -[/card] -[card] -primitive=Treetop Village -id=5558862 -rarity=S -[/card] -# 2 HG -[card] -primitive=Underworld Dreams -id=5558863 -rarity=S -[/card] -# Legend Membership -[card] -primitive=Counterspell -id=5558864 -rarity=S -[/card] -[card] -primitive=Incinerate -id=5558865 -rarity=S -[/card] \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/SVC/_cards.dat b/projects/mtg/bin/Res/sets/SVC/_cards.dat deleted file mode 100644 index 1aa5b8a6b..000000000 --- a/projects/mtg/bin/Res/sets/SVC/_cards.dat +++ /dev/null @@ -1,412 +0,0 @@ -[meta] -author=Wagic Team -name=Duel Decks: Speed vs. Cunning -block=Duel -year=2014 -total=81 -[/meta] -[card] -primitive=Act of Treason -id=386299 -rarity=C -[/card] -[card] -primitive=Aquamorph Entity -id=386300 -rarity=C -[/card] -[card] -primitive=Arc Trail -id=386301 -rarity=U -[/card] -[card] -primitive=Arcanis the Omnipotent -id=386302 -rarity=M -[/card] -[card] -primitive=Arrow Volley Trap -id=386303 -rarity=U -[/card] -[card] -primitive=Banefire -id=386304 -rarity=R -[/card] -[card] -primitive=Beetleback Chief -id=386305 -rarity=U -[/card] -[card] -primitive=Bone Splinters -id=386306 -rarity=C -[/card] -[card] -primitive=Coral Trickster -id=386307 -rarity=C -[/card] -[card] -primitive=Dauntless Onslaught -id=386308 -rarity=U -[/card] -[card] -primitive=Dregscape Zombie -id=386309 -rarity=C -[/card] -[card] -primitive=Echo Tracer -id=386310 -rarity=C -[/card] -[card] -primitive=Evolving Wilds -id=386311 -rarity=C -[/card] -[card] -primitive=Faerie Impostor -id=386312 -rarity=U -[/card] -[card] -primitive=Faerie Invaders -id=386313 -rarity=C -[/card] -[card] -primitive=Fathom Seer -id=386314 -rarity=C -[/card] -[card] -primitive=Fiery Fall -id=386315 -rarity=C -[/card] -[card] -primitive=Flame-Kin Zealot -id=386316 -rarity=U -[/card] -[card] -primitive=Fleeting Distraction -id=386317 -rarity=C -[/card] -[card] -primitive=Fleshbag Marauder -id=386318 -rarity=U -[/card] -[card] -primitive=Frenzied Goblin -id=386319 -rarity=U -[/card] -[card] -primitive=Fury of the Horde -id=386320 -rarity=R -[/card] -[card] -primitive=Ghitu Encampment -id=386321 -rarity=U -[/card] -[card] -primitive=Goblin Bombardment -id=386323 -rarity=U -[/card] -[card] -primitive=Goblin Deathraiders -id=386324 -rarity=C -[/card] -[card] -primitive=Goblin Warchief -id=386325 -rarity=U -[/card] -[card] -primitive=Hell's Thunder -id=386326 -rarity=R -[/card] -[card] -primitive=Hellraiser Goblin -id=386327 -rarity=U -[/card] -[card] -primitive=Hold the Line -id=386328 -rarity=R -[/card] -[card] -primitive=Hussar Patrol -id=386329 -rarity=C -[/card] -[card] -primitive=Impulse -id=386330 -rarity=C -[/card] -[card] -primitive=Infantry Veteran -id=386331 -rarity=C -[/card] -[card] -primitive=Inferno Trap -id=386332 -rarity=U -[/card] -[card] -primitive=Island -id=386333 -rarity=L -[/card] -[card] -primitive=Island -id=386334 -rarity=L -[/card] -[card] -primitive=Island -id=386335 -rarity=L -[/card] -[card] -primitive=Jeskai Elder -id=386336 -rarity=U -[/card] -[card] -primitive=Kathari Bomber -id=386337 -rarity=C -[/card] -[card] -primitive=Kor Hookmaster -id=386338 -rarity=C -[/card] -[card] -primitive=Krenko's Command -id=386340 -rarity=C -[/card] -[card] -primitive=Krenko, Mob Boss -id=386339 -rarity=R -[/card] -[card] -primitive=Leonin Snarecaster -id=386341 -rarity=C -[/card] -[card] -primitive=Lightning Angel -id=386342 -rarity=R -[/card] -[card] -primitive=Lightning Helix -id=386343 -rarity=U -[/card] -[card] -primitive=Lone Missionary -id=386344 -rarity=C -[/card] -[card] -primitive=Mana Leak -id=386345 -rarity=C -[/card] -[card] -primitive=Mardu Heart-Piercer -id=386346 -rarity=U -[/card] -[card] -primitive=Master Decoy -id=386347 -rarity=C -[/card] -[card] -primitive=Mountain -id=386348 -rarity=L -[/card] -[card] -primitive=Mountain -id=386349 -rarity=L -[/card] -[card] -primitive=Mountain -id=386350 -rarity=L -[/card] -[card] -primitive=Mountain -id=386351 -rarity=L -[/card] -[card] -primitive=Mystic Monastery -id=386352 -rarity=U -[/card] -[card] -primitive=Nomad Outpost -id=386353 -rarity=U -[/card] -[card] -primitive=Ogre Battledriver -id=386354 -rarity=R -[/card] -[card] -primitive=Oni of Wild Places -id=386355 -rarity=U -[/card] -[card] -primitive=Orcish Cannonade -id=386356 -rarity=C -[/card] -[card] -primitive=Plains -id=386357 -rarity=L -[/card] -[card] -primitive=Plains -id=386358 -rarity=L -[/card] -[card] -primitive=Plains -id=386359 -rarity=L -[/card] -[card] -primitive=Plains -id=386360 -rarity=L -[/card] -[card] -primitive=Reckless Abandon -id=386361 -rarity=C -[/card] -[card] -primitive=Repeal -id=386362 -rarity=C -[/card] -[card] -primitive=Scourge Devil -id=386363 -rarity=U -[/card] -[card] -primitive=Shambling Remains -id=386364 -rarity=U -[/card] -[card] -primitive=Shock -id=386365 -rarity=C -[/card] -[card] -primitive=Sparkmage Apprentice -id=386366 -rarity=C -[/card] -[card] -primitive=Sphinx of Uthuun -id=386367 -rarity=R -[/card] -[card] -primitive=Stave Off -id=386368 -rarity=C -[/card] -[card] -primitive=Steam Augury -id=386369 -rarity=R -[/card] -[card] -primitive=Stonecloaker -id=386370 -rarity=U -[/card] -[card] -primitive=Swamp -id=386371 -rarity=L -[/card] -[card] -primitive=Swamp -id=386372 -rarity=L -[/card] -[card] -primitive=Swamp -id=386373 -rarity=L -[/card] -[card] -primitive=Swift Justice -id=386374 -rarity=C -[/card] -[card] -primitive=Terramorphic Expanse -id=386375 -rarity=C -[/card] -[card] -primitive=Thousand Winds -id=386376 -rarity=R -[/card] -[card] -primitive=Traumatic Visions -id=386377 -rarity=C -[/card] -[card] -primitive=Whiplash Trap -id=386378 -rarity=C -[/card] -[card] -primitive=Willbender -id=386379 -rarity=U -[/card] -[card] -primitive=Zurgo Helmsmasher -id=386380 -rarity=M -[/card] diff --git a/projects/mtg/bin/Res/sets/primitives/_macros.txt b/projects/mtg/bin/Res/sets/primitives/_macros.txt index 708098c56..d4590343e 100644 --- a/projects/mtg/bin/Res/sets/primitives/_macros.txt +++ b/projects/mtg/bin/Res/sets/primitives/_macros.txt @@ -15,3 +15,11 @@ # Fabricate #AUTO_DEFINE _FABRICATE_($c) transforms((,newability[choice counter(1/1.$c)],newability[choice create(Servo:Artifact Creature Servo:1/1)*$c])) ueot +# Scry, Evergreen +#AUTO_DEFINE _SCRY_($c) scry:$c scrycore delayed dontshow donothing scrycoreend scryend + +# Amass, Set WAR +#AUTO_DEFINE _AMASS_($c) if type(army|mybattlefield)~morethan~0 then counter(1/1,$c) notATarget(army|myBattlefield) else create(Zombie Army:creature Zombie Army:0/0:black) and!(counter(1/1,$c) notATarget(army|myBattlefield))! + +# Treasure token, Set XLN +#AUTO_DEFINE _TREASURE_ create(Treasure:Artifact Treasure:0/0:"{T}, Sacrifice this artifact: Add one mana of any color.") and!( transforms((,newability[{T}{S}:Add{W}],newability[{T}{S}:Add{U}],newability[{T}{S}:Add{R}],newability[{T}{S}:Add{B}],newability[{T}{S}:Add{G}])) forever )! \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 970de3fc5..33b451a1d 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -512,8 +512,8 @@ type=Sorcery [/card] [card] name=Relentless Dead -auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{B}:moveto(myhand)])) ueot -auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{X}:moveto(myhand) target(zombie[manacost=X]|mygraveyard)])) ueot +autograveyard=@movedTo(this|graveyard) from(battlefield):name(return relentless dead) pay({B}) moveTo(hand) +auto=@movedTo(this|graveyard) from(battlefield):choice name(rturn cost X) pay({1}) moveTo(battlefield) target(other zombie|mygraveyard) text=Menace (This creature can't be blocked except by two or more creatures.) -- When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. -- When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield. mana={B}{B} abilities=menace @@ -787,15 +787,6 @@ mana={2}{U} type=Instant [/card] [card] -name=Villainous Wealth -#can't order stack -target=opponent -auto=moveto(exile) and!( if cantargetcard(*[-land;manacost<=castx]|*) then transforms((,newability[may activate castcard(normal)]])) ueot )! all(*[zpos<=castx]|mylibrary) -text=Target opponent exiles the top X cards of his or her library. You may cast any number of nonland cards with converted mana cost X or less from among them without paying their mana costs. -mana={X}{B}{G}{U} -type=Sorcery -[/card] -[card] name=Watcher of the Roost #missing reveal card abilities=flying @@ -810,14 +801,6 @@ power=2 toughness=1 [/card] [card] -name=Wolfcaller's Howl -#wagic supports one opponent only -auto=@each my upkeep restriction{type(*|opponenthand)~morethan~3}:token(Wolf,Creature Wolf,2/2,green) -text=At the beginning of your upkeep, put X 2/2 green Wolf creature tokens onto the battlefield, where X is the number of your opponents with four or more cards in hand. -mana={3}{G} -type=Enchantment -[/card] -[card] name=Wren's Run Vanquisher otherrestriction=type(*[elf]|myhand)~lessthan~2 other={4}{G} diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 5aaea0e34..2066fbf43 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -4262,7 +4262,7 @@ type=Artifact [card] name=Ankle Shanker abilities=haste -auto=@combat(attacking) source(this):all(creature|mybattlefield) transforms((newability[first strike ueot],newability[deathtouch ueot])) ueot +auto=@combat(attacking) source(this):all(creature|mybattlefield) transforms((,newability[first strike ueot],newability[deathtouch ueot])) ueot text=Haste -- Whenever Ankle Shanker attacks, creatures you control gain first strike and deathtouch until end of turn. mana={2}{R}{W}{B} type=Creature @@ -6189,7 +6189,7 @@ type=Sorcery name=Artful Maneuver target=creature auto=2/2 ueot -auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this)all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Target creature gets +2/+2 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={1}{W} type=Instant @@ -7974,7 +7974,7 @@ toughness=2 [/card] [card] name=Awaken the Ancient -target=mountain +target=land[mountain] auto=transforms((Giant Creature,setpower=7,settoughness=7,red,haste)) text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 7/7 red Giant creature with haste. It's still a land. mana={1}{R}{R}{R} @@ -8791,6 +8791,7 @@ toughness=2 [/card] [card] name=Balustrade Spy +abilities=flying auto=target(player) Reveal:1 revealzone(targetedpersonslibrary) revealuntil(land|targetedpersonslibrary) optionone choice name(Look) target(*|reveal) donothing optiononeend optiontwo choice name(put in Graveyard) all(*|reveal) moveto(graveyard) optiontwoend revealend text=Flying -- When Balustrade Spy enters the battlefield, target player reveals cards from the top of his or her library until he or she reveals a land card, then puts those cards into his or her graveyard. mana={3}{B} @@ -8849,10 +8850,10 @@ toughness=5 name=Bane of Progress auto=count(type:artifact:battlefield) auto=all(artifact|battlefield) destroy -auto=counter(1/1,1,countedamountminustype:artifact:battlefieldminusend) +auto=counter(1/1,countedamountminustype:artifact:battlefieldminusend) auto=count(type:enchantment:battlefield) auto=all(enchantment|battlefield) destroy -auto=counter(1/1,1,countedamountminustype:enchantment:battlefieldminusend) +auto=counter(1/1,countedamountminustype:enchantment:battlefieldminusend) text=When Bane of Progress enters the battlefield, destroy all artifacts and enchantments. Put a +1/+1 counter on Bane of Progress for each permanent destroyed this way. mana={4}{G}{G} type=Creature @@ -8992,8 +8993,8 @@ type=Instant [card] name=Bant Panorama auto={T}:Add{1} -aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&island;forest;plains]|myLibrary) -auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&island;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;island;forest;plains]|myLibrary) +auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;island;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend 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] @@ -12560,7 +12561,7 @@ toughness=1 [/card] [card] name=Bloodhall Priest -auto=target(creature,player) damage:2 +auto=target(creature,player) damage:2 restriction{type(*|myhand)~lessthan~1} auto=@combat(attacking) source(this) restriction{type(*|myhand)~lessthan~1}:target(creature,player) damage:2 abilities=madness autoexile=restriction{discarded} pay({1}{b}{r}) name(pay 1BR to cast) activate name(pay 1BR to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) @@ -12936,8 +12937,9 @@ subtype=Aura [/card] [card] name=Blue Sun's Zenith -target=player -auto=draw:X +#target=player +auto=choice name(You draw X) draw:X controller +auto=choice name(Opponent draws) draw:X target(opponent) alias=135262 text=Target player draws X cards. Shuffle Blue Sun's Zenith into its owner's library. mana={X}{U}{U}{U} @@ -13796,6 +13798,7 @@ toughness=4 [/card] [card] name=Borborygmos Enraged +abilities=trample auto={D(land|myhand)}:target(creature,player) damage:3 aicode=activate target(<3>*[zpos<=3]|mylibrary) name(revealed card) moveto(myhand) name(revealed card) and!(if cantargetcard(*[-land]|*) then moveto(mygraveyard))! auto=@combatdamaged(player) from(this):reveal:3 optionone name(Reveal) target(<3>land|reveal) moveto(myhand) optiononeend optiontwo name(Send To Grave) choice all(*|reveal) moveto(mygraveyard) optiontwoend revealend @@ -14399,8 +14402,10 @@ type=Sorcery [/card] [card] name=Braingeyser -target=player -auto=draw:X +#target=player +#auto=draw:X +auto=choice name(You draw X) draw:X controller +auto=choice name(Opponent draws) draw:X target(opponent) text=Target player draws X cards. mana={X}{U}{U} type=Sorcery @@ -18237,7 +18242,7 @@ auto=choice name(red) transforms((,newability[protection from red])) ueot auto=choice name(blue) transforms((,newability[protection from blue])) ueot auto=choice name(black) transforms((,newability[protection from black])) ueot auto=choice name(white) transforms((,newability[protection from white])) ueot -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Target creature you control gains protection from the color of your choice until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={1}{W} type=Instant @@ -18536,7 +18541,7 @@ toughness=5 [/card] [card] name=Chained to the Rocks -target=mountain|mybattlefield +target=land[mountain]|mybattlefield auto=(blink)forsrc target(creature|opponentbattlefield) text=Enchant Mountain you control. -- When Chained to the Rocks enters the battlefield, exile target creature an opponent controls until Chained to the Rocks leaves the battlefield. That creature returns under its owner's control.) mana={W} @@ -19484,7 +19489,6 @@ type=Artifact [card] name=Chimeric Mass auto=counter(0/0,X,Charge) -auto=counter{0%0.1.charge}/counter{0%0.1.charge} nonstatic auto={1}:transforms((Artifact Creature Construct,setpower=counter{0%0.1.charge},settoughness=counter{0%0.1.charge})) ueot text=Chimeric Mass enters the battlefield with X charge counters. -- {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it." mana={X} @@ -19686,7 +19690,7 @@ type=Sorcery name=Chosen by Heliod target=creature auto=0/2 -auto=draw:1 targetcontroller +auto=draw:1 controller text=Enchant creature. -- When Chosen by Heliod enters the battlefield, draw a card. -- Enchanted creature gets +0/+2. mana={1}{W} type=Enchantment @@ -20184,10 +20188,10 @@ toughness=4 [card] name=City of Brass auto=@tapped(this):damage:1 controller -auto={T}:Add{U} -auto={T}:Add{R} auto={T}:Add{W} +auto={T}:Add{U} auto={T}:Add{B} +auto={T}:Add{R} auto={T}:Add{G} text=Whenever City of Brass becomes tapped, it deals 1 damage to you. -- {T}: Add one mana of any color to your mana pool. type=Land @@ -22224,7 +22228,7 @@ type=Instant name=Consuming Vapors target=player auto=ability$! notatarget(creature|mybattlefield) dynamicability sacrifice ) !$ targetedplayer -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Target player sacrifices a creature. You gain life equal to that creature's toughness. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={3}{B} type=Sorcery @@ -22242,7 +22246,7 @@ toughness=1 [card] name=Contagion Clasp auto=counter(-1/-1,1) target(creature) -auto={4}{T}:notatarget(*[artifact;creature;enchantment;land;planeswalker;player]) proliferate +auto={4}{T}:notatarget(*) propagate text=When Contagion Clasp enters the battlefield, put a -1/-1 counter on target creature. -- {4}, Tap: Proliferate. (You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.) mana={2} type=Artifact @@ -22917,7 +22921,7 @@ text=Counter target spell if its controller is poisoned. [/card] [card] name=Corrupted Roots -target=forest,plains +target=land[forest;plains] auto=@tapped(mytgt):life:-2 targetController text=Enchant Forest or Plains -- Whenever enchanted land becomes tapped, its controller loses 2 life. mana={B} @@ -23744,7 +23748,7 @@ toughness=1 [card] name=Crimson Hellkite abilities=flying -auto={X:red}:damage:X target(creature) +auto={X:red}{T}:damage:X target(creature) text=Flying -- {X}, {T}: Crimson Hellkite deals X damage to target creature. Spend only red mana this way. mana={6}{R}{R}{R} type=Creature @@ -25540,9 +25544,9 @@ toughness=4 [/card] [card] name=Damnable Pact -target=player -auto=draw:X targetedplayer -auto=life:-X targetedplayer +#target=player +auto=choice name(You draw) draw:X && life:-X controller +auto=choice name(Opponent draws) draw:X && life:-X target(opponent) text=Target player draws X cards and loses X life. mana={X}{B}{B} type=Sorcery @@ -25919,9 +25923,11 @@ type=Instant [/card] [card] name=Dark Salvation -target=player -auto=token(Zombie,Creature Zombie,2/2,black)*xx targetedplayer -auto=ability$!name(Darkness) target(creature|Battlefield) foreach(zombie|myBattlefield) -1/-1!$ targetedplayer +#target=player +#auto=token(Zombie,Creature Zombie,2/2,black)*xx targetedplayer +#auto=ability$!name(Darkness) target(creature|Battlefield) foreach(zombie|myBattlefield) -1/-1!$ targetedplayer +auto=token(Zombie,Creature Zombie,2/2,black)*xx +auto=name(-X/-X) target(creature|Battlefield) -type:zombie:myBattlefield/-type:zombie:myBattlefield text=Target player puts X 2/2 black Zombie creature tokens onto the battlefield, then up to one target creature gets -1/-1 until end of turn for each Zombie that player controls. mana={X}{X}{B} type=Sorcery @@ -30318,7 +30324,7 @@ name=Distortion Strike target=creature auto=1/0 ueot auto=unblockable ueot -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Target creature gets +1/+0 until end of turn and is unblockable this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={U} type=Sorcery @@ -30400,7 +30406,7 @@ type=Sorcery [/card] [card] name=Divine Congregation -auto=choice name(target player) target(player) donothing && all(this) transforms((,newability[life:twicetype:creature:targetedpersonsbattlefield])) +auto=choice name(target player) target(player) all(this) transforms((,newability[life:twicetype:creature:targetedpersonsbattlefield])) text=You gain 2 life for each creature target player controls. -- Suspend 5 - {1}{W} (Rather than cast this card from your hand, you may pay {1}{W} and exile it with five time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.) mana={3}{W} suspend(5)={1}{w} @@ -34183,7 +34189,7 @@ toughness=4 [/card] [card] name=Eight-and-a-Half-Tails -auto={1}{W}:protection from white target(creature) +auto={1}{W}:protection from white target(*|myBattlefield) auto={1}:name(target permanent becomes white ueot) transforms((,white)) target(*) ueot text={1}{W}: Target permanent you control gains protection from white until end of turn. -- {1}: Target spell or permanent becomes white until end of turn. mana={W}{W} @@ -34488,8 +34494,8 @@ type=Instant name=Electrolyze target=creature,player auto=damage:1 -auto=damage:1 target(creature,player) auto=draw:1 controller +auto=damage:1 target(creature,player) text=Electrolyze deals 2 damage divided as you choose among one or two target creatures and/or players. -- Draw a card. mana={1}{U}{R} type=Instant @@ -35578,7 +35584,7 @@ auto=choice name(red) transforms((,newability[protection from red])) ueot auto=choice name(blue) transforms((,newability[protection from blue])) ueot auto=choice name(black) transforms((,newability[protection from black])) ueot auto=choice name(white) transforms((,newability[protection from white])) ueot -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Target creature you control gains protection from the color of your choice until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={W} type=Instant @@ -36115,7 +36121,7 @@ type=Instant [/card] [card] name=Energy Bolt -auto=choice damage:X target(player) +auto=choice damage:X opponent auto=choice life:X target(player) text=Choose one - Energy Bolt deals X damage to target player; or target player gains X life. mana={X}{R}{W} @@ -36980,8 +36986,8 @@ toughness=3 [card] name=Esper Panorama auto={T}:Add{1} -aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&swamp;island;plains]|myLibrary) -auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&swamp;island;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;swamp;island;plains]|myLibrary) +auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;swamp;island;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend 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] @@ -39509,8 +39515,8 @@ type=Sorcery [/card] [card] name=Feast of Dreams -target=creature[enchantment] -auto=destroy +auto=choice name(enchanted creature) destroy target(creature[enchanted]) +auto=choice name(enchantment creature) destroy target(creature[enchantment]) text=Destroy target enchanted creature or enchantment creature. mana={1}{B} type=Instant @@ -40018,7 +40024,7 @@ toughness=2 [card] name=Fertile Ground target=land -auto=all(this) transforms((,newability[produceextra:selectmana])) forever +auto=all(this) transforms((,newability[produceextra:selectmana] controller)) forever text=Enchant land -- Whenever enchanted land is tapped for mana, its controller adds one mana of any color to his or her mana pool (in addition to the mana the land produces). mana={1}{G} type=Enchantment @@ -41595,7 +41601,7 @@ toughness=2 [card] name=Flayer Drone abilities=first strike -auto=@movedto(other creature[colorless]|battlefield):target(opponent) life:-1 +auto=@movedto(other creature[colorless]|mybattlefield):target(opponent) life:-1 text=Devoid (This card has no color.) -- First strike -- Whenever another colorless creature enters the battlefield under your control, target opponent loses 1 life. mana={1}{B}{R} abilities=devoid @@ -44086,7 +44092,7 @@ subtype=Aura name=Funeral Pyre target=*|graveyard auto=moveto(exile) -auto=token(Spirit creature,1/1,flying) targetcontroller +auto=create(Spirit:creature Spirit:1/1:white:flying) targetcontroller text=Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield. mana={W} type=Instant @@ -45442,7 +45448,7 @@ toughness=4 [/card] [card] name=Genju of the Cedars -target=forest +target=land[forest] auto={2}:transforms((Spirit Creature,setpower=4,settoughness=4,green)) ueot auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) text=Enchant Forest -- {2}: Enchanted Forest becomes a 4/4 green Spirit creature until end of turn. It's still a land. -- When enchanted Forest is put into a graveyard, you may return Genju of the Cedars from your graveyard to your hand. @@ -45452,7 +45458,7 @@ subtype=Aura [/card] [card] name=Genju of the Falls -target=island +target=land[island] auto={2}:transforms((Spirit Creature,setpower=3,settoughness=2,flying,blue)) ueot auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) text=Enchant Island -- {2}: Enchanted Island becomes a 3/2 blue Spirit creature with flying until end of turn. It's still a land. -- When enchanted Island is put into a graveyard, you may return Genju of the Falls from your graveyard to your hand. @@ -45462,7 +45468,7 @@ subtype=Aura [/card] [card] name=Genju of the Fens -target=swamp +target=land[swamp] auto={2}:transforms((Spirit Creature,newability[{B}:1/1],setpower=2,settoughness=2,black)) ueot auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) text=Enchant Swamp -- {2}: Until end of turn, enchanted Swamp becomes a 2/2 black Spirit creature with "{B}: This creature gets +1/+1 until end of turn." It's still a land. -- When enchanted Swamp is put into a graveyard, you may return Genju of the Fens from your graveyard to your hand. @@ -45472,7 +45478,7 @@ subtype=Aura [/card] [card] name=Genju of the Fields -target=plains +target=land[plains] auto={2}:transforms((Spirit Creature,setpower=2,settoughness=5,spiritlink,white)) ueot auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) text=Enchant Plains -- {2}: Until end of turn, enchanted Plains becomes a 2/5 white Spirit creature with "Whenever this creature deals damage, its controller gains that much life." It's still a land. -- When enchanted Plains is put into a graveyard, you may return Genju of the Fields from your graveyard to your hand. @@ -45492,7 +45498,7 @@ subtype=Aura [/card] [card] name=Genju of the Spires -target=mountain +target=land[mountain] auto={2}:transforms((Spirit Creature,setpower=6,settoughness=1,red)) ueot auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 6/1 red Spirit creature until end of turn. It's still a land. -- When enchanted Mountain is put into a graveyard, you may return Genju of the Spires from your graveyard to your hand. @@ -46652,11 +46658,11 @@ toughness=1 [/card] [card] name=Gilded Lotus -auto={T}:Add{B}{B}{B} -auto={T}:Add{G}{G}{G} -auto={T}:Add{R}{R}{R} -auto={T}:Add{U}{U}{U} auto={T}:Add{W}{W}{W} +auto={T}:Add{U}{U}{U} +auto={T}:Add{B}{B}{B} +auto={T}:Add{R}{R}{R} +auto={T}:Add{G}{G}{G} text={T}: Add three mana of any one color to your mana pool. mana={5} type=Artifact @@ -48044,6 +48050,7 @@ type=Sorcery [card] name=Goblin Guide abilities=haste +aicode=activate target(land[zpos<=1]|opponentLibrary) moveto(ownerhand) auto=@combat(attacking) source(this):reveal:1 revealzone(opponentlibrary) optionone name(choose card) notatarget(<1>*|reveal) moveto(ownerlibrary) and!( if cantargetcard(*[land]|*) then moveto(ownerhand) )! optiononeend revealend text=Haste -- Whenever Goblin Guide attacks, defending player reveals the top card of his or her library. If it's a land card, that player puts it into his or her hand. mana={R} @@ -50070,7 +50077,7 @@ toughness=3 [card] name=Great Teacher's Decree auto=all(creature|mybattlefield) 2/1 ueot -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Creatures you control get +2/+1 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={3}{W} type=Sorcery @@ -50847,8 +50854,8 @@ toughness=1 [card] name=Grixis Panorama auto={T}:Add{1} -aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;island;swamp]|myLibrary) -auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;island;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;island;swamp]|myLibrary) +auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;island;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend 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] @@ -55460,7 +55467,6 @@ facedown={3} autofacedown={3}{G}{G}:morph autofaceup=counter(1/1,5) auto=counter(1/1,X) -auto=0/-1 auto=@movedTo(this|Graveyard) from(myBattlefield):thisforeach(counter{1/1.1}) token(Snake,Creature Snake,1/1,green) text=Hooded Hydra enters the battlefield with X +1/+1 counters on it. -- When Hooded Hydra dies, put a 1/1 green Snake creature token onto the battlefield for each +1/+1 counter on it. -- Morph {3}G}{G}: As Hooded Hydra is turned face up, put five +1/+1 counters on it. mana={X}{G}{G} @@ -57662,6 +57668,7 @@ toughness=1 [/card] [card] name=Imposing Visage +target=creature auto=teach(creature) menace text=Enchant creature -- Enchanted creature can't be blocked except by two or more creatures. mana={R} @@ -60975,8 +60982,8 @@ toughness=1 [card] name=Jund Panorama auto={T}:Add{1} -aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;forest;swamp]|myLibrary) -auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;forest;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;forest;swamp]|myLibrary) +auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;forest;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend 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] @@ -63776,7 +63783,7 @@ toughness=2 [card] name=Knight of the Mists abilities=flanking -auto=pay[[{U}]] name(pay blue mana) donothing?bury +auto=pay[[{U}]] name(pay blue mana) donothing?bury target(Knight) text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- When Knight of the Mists enters the battlefield, you may pay {U}. If you don't, destroy target Knight and it can't be regenerated. mana={2}{U} type=Creature @@ -63797,8 +63804,8 @@ toughness=2 [card] name=Knight of the Reliquary auto=foreach(land|mygraveyard) 1/1 -aicode=activate moveTo(myBattlefield) target(land|myLibrary) -auto={T}{S(forest,plains|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(land|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend +auto={T}{S(forest,plains|myBattlefield)}:moveTo(myBattlefield) target(land|myLibrary) +#auto={T}{S(forest,plains|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(land|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text=Knight of the Reliquary gets +1/+1 for each land card in your graveyard. -- {T}, Sacrifice a Forest or Plains: Search your library for a land card, put it onto the battlefield, then shuffle your library. mana={1}{G}{W} type=Creature @@ -65248,7 +65255,7 @@ subtype=Equipment [/card] [card] name=Kynaios and Tiro of Meletis -auto=@each my end:draw:1 && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ controller && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ opponent +auto=@each my end:draw:1 && ability$!if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ controller && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ opponent text=At the beginning of your end step, draw a card. Each player may put a land card from his or her hand onto the battlefield, then each opponent who didn't draws a card. mana={R}{G}{W}{U} type=Legendary Creature @@ -68093,7 +68100,7 @@ name=Llanowar Reborn auto=tap(noevent) auto={T}:Add{G} auto=counter(1/1,1) -auto=@movedto(creature|battlefield):may this(counter{1/1}) all(trigger) counter(1/1,1) && this(counter{1/1}) counter(1/1,-1) +auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)])) text=Llanowar Reborn enters the battlefield tapped. -- {T}: Add {G} to your mana pool. -- Graft 1 (This land enters the battlefield with a +1/+1 counter on it. Whenever a creature enters the battlefield, you may move a +1/+1 counter from this land onto it.) type=Land [/card] @@ -72379,7 +72386,7 @@ toughness=3 [card] name=Mayael the Anima aicode=activate target(creature[power>=5;zpos<=5]|mylibrary) moveto(mybattlefield) -auto={3}{R}{G}{W}{T}:name(look) reveal:5 optionone name(Get Creature) target(creature[power >4]|reveal) moveto(mybattlefield) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend +auto={3}{R}{G}{W}{T}:name(look) reveal:5 optionone name(Get Creature) target(creature[power>=5]|reveal) moveto(mybattlefield) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend text={3}{R}{G}{W}, {T}: Look at the top five cards of your library. You may put a creature card with power 5 or greater from among them onto the battlefield. Put the rest on the bottom of your library in any order. mana={R}{G}{W} type=Legendary Creature @@ -74038,6 +74045,7 @@ type=Legendary Land [card] name=Mind Burst target=player +auto=ability$!name(discard) target(*|myhand) reject!$ targetedplayer auto=ability$!name(discard) target(*|myhandplus1plusend) reject!$ targetedplayer text=Target player discards X cards, where X is one plus the number of cards named Mind Burst in all graveyards. mana={1}{B} @@ -74687,7 +74695,7 @@ type=Instant [/card] [card] name=Mirari -auto=@movedto(*[instant;sorcery]|mystack):target(trigger[to]<1>) pay[[{3}]] name(copy spell) activate name(copy spell) castcard(copied noevent) +auto=@movedto(*[instant;sorcery]|mystack):all(trigger[to]<1>) transforms((,newability[pay[[{3}]] name(copy spell) activate name(copy spell) castcard(copied noevent)])) forever text=Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy. mana={5} type=Legendary Artifact @@ -77469,7 +77477,7 @@ type=Instant [card] name=Murderous Redcap abilities=persist -auto=target(creature) dynamicability +auto=target(creature,player) dynamicability text=When Murderous Redcap enters the battlefield, it deals damage equal to its power to target creature or player. -- Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.) mana={2}{BR}{BR} type=Creature @@ -78282,7 +78290,7 @@ type=Sorcery name=Nahiri, the Harbinger auto=counter(0/0,4,loyalty) aicode=activate moveto(mybattlefield) notatarget(artifact,creature|mylibrary) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )! -auto={C(0/0,2,Loyalty)}:name(+2: Discard to draw) notatarget(*|myhand) transforms((,newability[reject and!(draw:1)!])) forever +auto={C(0/0,2,Loyalty)}:name(+2: Discard to draw)may notatarget(*|myhand) transforms((,newability[reject and!(draw:1)!])) forever auto={C(0/0,-2,Loyalty)}:name(-2: Exile tapped Artifact or Creature) target(*[artifact;creature;tapped]) moveto(exile) auto={C(0/0,-2,Loyalty)}:name(-2: Exile target Enchantment) target(enchantment) moveto(exile) auto={C(0/0,-8,Loyalty)}:name(-8: Fetch) reveal:plibrarycount optionone name(choose card) target(artifact,creature|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveto(mybattlefield) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )!)! afterrevealedend revealend @@ -78794,8 +78802,8 @@ toughness=1 [card] name=Naya Panorama auto={T}:Add{1} -aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;forest;plains]|myLibrary) -auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;forest;plains]|myLibrary) +auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend 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] @@ -80930,7 +80938,7 @@ toughness=2 [card] name=Nomads' Assembly auto=token(Kor Soldier,Creature Kor Soldier,1/1,white)*type:creature:mybattlefield -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Put a 1/1 white Kor Soldier creature token onto the battlefield for each creature you control. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={4}{W}{W} type=Sorcery @@ -80959,8 +80967,8 @@ toughness=0 [/card] [card] name=Norin the Wary -auto=@movedTo(*|stack):(blink)ueot -auto=@combat(attacking) source(creature):(blink)ueot +auto=@movedTo(*|stack):transforms((,newability[moveto(exile)],newability[phaseactionmulti[endofturn] moveto(ownerbattlefield)])) +auto=@combat(attacking) source(creature):transforms((,newability[moveto(exile)],newability[phaseactionmulti[endofturn] moveto(ownerbattlefield)])) text=When a player casts a spell or a creature attacks, exile Norin the Wary. Return it to the battlefield under its owner's control at the beginning of the next end step. mana={R} type=Legendary Creature @@ -81639,7 +81647,7 @@ type=Enchantment [/card] [card] name=Oath of Nissa -aicode=activate target(creature,land,planeswalker[zpos<=3]|mylibrary) moveto(myhand) +aicode=activate target(*[creature;land;planeswalker;zpos<=3]|mylibrary) moveto(myhand) auto=name(look) reveal:3 optionone name(Get a card) target(<1>*[creature;land;planeswalker]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend auto=lord(planeswalker|mycastingzone) anytypeofmana text=When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- You may spend mana as though it were mana of any color to cast planeswalker spells. @@ -82313,7 +82321,7 @@ toughness=6 name=Ojutai's Breath target=creature auto=freeze -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Tap target creature. It doesn't untap during its controller's next untap step. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={2}{U} type=Instant @@ -82321,7 +82329,7 @@ type=Instant [card] name=Ojutai's Summons auto=create(Djinn Monk:Creature Djinn Monk:2/2:flying:blue) -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Put a 2/2 blue Djinn Monk creature token with flying onto the battlefield. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={3}{U}{U} type=Sorcery @@ -82430,7 +82438,7 @@ toughness=2 [card] name=Omen aicode=name(look) activate name(look) transforms((,newability[foreach(*[zpos<=4]|mylibrary) moverandom(*[zpos<=4]) from(mylibrary) to(mylibrary)],newability[draw:1])) ueot -auto=name(Look) reveal:3 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo target(<3>*|reveal) moveto(mylibrary) optiontwoend afterrevealed transforms((,newability[choice shuffle && draw:1],newability[choice name(Cancel) draw:1])) afterrevealedend revealend +auto=name(Look) reveal:3 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo target(<3>*|reveal) moveto(mylibrary) optiontwoend afterrevealed transforms((,newability[choice shuffle && draw:1],newability[choice name(Cancel) draw:1])) afterrevealedend revealend text=Look at the top three cards of your library, then put them back in any order. You may shuffle your library. -- Draw a card. mana={1}{U} type=Sorcery @@ -82940,8 +82948,8 @@ type=Enchantment [card] name=Opt aicode=activate may bottomoflibrary all(*[zpos=1]|mylibrary) -auto=name(Look) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend auto=draw:1 +auto=name(Look) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend text=Look at the top card of your library. You may put that card on the bottom of your library. -- Draw a card. mana={U} type=Instant @@ -83789,7 +83797,7 @@ subtype=Arcane name=Otherworldly Outburst target=creature auto=1/0 ueot -auto=transforms((newability[@movedto(this|graveyard) from(battlefield):token(Eldrazi Horror)])) ueot +auto=transforms((,newability[@movedto(this|graveyard) from(battlefield):token(Eldrazi Horror)])) ueot text=Target creature gets +1/+0 until end of turn. When that creature dies this turn, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield. mana={R} type=Instant @@ -84058,8 +84066,10 @@ type=Instant [/card] [card] name=Overwhelming Stampede -auto=all(creature|mybattlefield) power:highest:creature:mybattlefield/power:highest:creature:mybattlefield ueot -auto=all(creature|mybattlefield) trample ueot +auto=notatarget(creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature|mybattlefield) dynamicability,newability[all(creature|mybattlefield) trample])) +#auto=choice notatarget((creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature)|mybattlefield] power)) +#auto=all(creature|mybattlefield) /power:highest:creature:mybattlefield +#auto=all(creature|mybattlefield) trample ueot text=Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. (If a creature you control would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.) mana={3}{G}{G} type=Sorcery @@ -85254,7 +85264,7 @@ type=Sorcery [/card] [card] name=Peak Eruption -target=mountain +target=land[mountain] auto=destroy auto=Damage:3 targetController text=Destroy target Mountain. Peak Eruption deals 3 damage to that land's controller. @@ -88605,7 +88615,7 @@ type=Sorcery name=Prey's Vengeance target=creature auto=2/2 -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Target creature gets +2/+2 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={G} type=Instant @@ -89341,7 +89351,7 @@ type=Sorcery name=Profound Journey target=*[-instant;-sorcery]|mygraveyard auto=moveto(ownerbattlefield) -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Return target permanent card from your graveyard to the battlefield. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={5}{W}{W} type=Sorcery @@ -89895,7 +89905,7 @@ type=Instant [card] name=Pulse of the Dross target=player -auto=Reveal:3 revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend afterrevealed if type(*|myhand)~lessthan~type(*|opponenthand) then moveto(myhand) afterrevealedend revealend +auto=Reveal:3 revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend afterrevealed if type(*|myhand)~lessthan~type(*|opponenthand) then moveto(myhand) all(this) afterrevealedend revealend text=Target player reveals three cards from his or her hand and you choose one of them. That player discards that card. Then if that player has more cards in hand than you, return Pulse of the Dross to its owner's hand. mana={1}{B}{B} type=Sorcery @@ -91463,7 +91473,7 @@ name=Raging Ravine auto=tap(noevent) auto={T}:Add{R} auto={T}:Add{G} -auto={2}{R}{G}:transforms((Elemental Creature,setpower=3,settoughness=3,red,green,newability[@combat(attacking) source(this):counter(1/1.1)])) ueot +auto={2}{R}{G}:transforms((Elemental Creature,setpower=3,settoughness=3,red,green,newability[@combat(attacking) source(this):counter(1/1.1) all(this)])) ueot text=Raging Ravine enters the battlefield tapped. -- {T}: Add {R} or {G} to your mana pool. -- {2}{R}{G}: Until end of turn, Raging Ravine becomes a 3/3 red and green Elemental creature with "Whenever this creature attacks, put a +1/+1 counter on it." It's still a land. type=Land [/card] @@ -91802,9 +91812,9 @@ toughness=6 [/card] [card] name=Rakdos's Return -target=opponent -auto=damage:x -auto=ability$!name(discard) target(*|myhand) reject!$ targetedplayer +#target=opponent Game crashes when AI plays a card with cost {X} and that targets a player +auto=damage:x opponent +auto=ability$!name(discard) target(*|myhand) reject!$ opponent text=Rakdos's Return deals X damage to target opponent. That player discards X cards. mana={X}{B}{R} type=Sorcery @@ -93060,9 +93070,9 @@ type=Sorcery [/card] [card] name=Reap Intellect -target=opponent -aicode=activate notatarget(*[-land]|targetedpersonshand) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(*[-land]|reveal) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +#target=opponent Game crashes when AI plays a card with cost {X} and that targets a player +aicode=activate notatarget(*[-land]|opponenthand) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! +auto=reveal:type:*:opponenthand revealzone(opponenthand) optionone name(choose card) notatarget(*[-land]|reveal) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose up to X nonland cards from it and exile them. For each card exiled this way, search that player's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles his or her library. mana={X}{2}{U}{B} type=Sorcery @@ -93555,8 +93565,8 @@ type=Instant [card] name=Recurring Insight target=opponent -auto=draw:type:*:targetedpersonshand -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=draw:type:*:targetedpersonshand controller +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Draw cards equal to the number of cards in target opponent's hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={4}{U}{U} type=Sorcery @@ -101139,7 +101149,7 @@ type=Sorcery [card] name=Scrounging Bandar auto=counter(1/1,2) -auto={0}{counter(1/1,-1)}:counter(1/1,1) target(creature) myUpkeepOnly +auto={0}{counter(1/1,-1)}:counter(1/1,1) target(other creature) myUpkeepOnly text=Scrounging Bandar enters the battlefield with two +1/+1 counters on it. -- At the beginning of your upkeep, you may move any number of +1/+1 counters from Scrounging Bandar onto another target creature. mana={1}{G} type=Creature @@ -101573,8 +101583,8 @@ type=Enchantment [/card] [card] name=Sealed Fate -target=opponent -auto=name(Look) reveal:x revealzone(targetedpersonslibrary) optionone name(exile a card) target(*|reveal) moveto(ownerexile) optiononeend optiontwo target(<60>*|reveal) moveto(ownerlibrary) optiontwoend revealend +#target=opponent Game crashes when AI plays a card with cost {X} and that targets a player +auto=name(Look) reveal:x revealzone(opponentlibrary) optionone name(exile a card) target(<1>*|reveal) moveto(ownerexile) optiononeend optiontwo target(<60>*|reveal) moveto(ownerlibrary) optiontwoend revealend text=Look at the top X cards of target opponent's library. Exile one of those cards and put the rest back on top of that player's library in any order. mana={X}{U}{B} type=Sorcery @@ -101630,8 +101640,7 @@ toughness=1 [card] name=Searing Blood target=creature -auto=damage:2 -auto=transforms((newability[@movedto(this|graveyard) from(battlefield):damage:3 controller])) ueot +auto=transforms((,newability[@movedto(this|graveyard) from(battlefield):damage:3 controller])) ueot && damage:2 text=Searing Blood deals 2 damage to target creature. When that creature dies this turn, Searing Blood deals 3 damage to the creature's controller. mana={R}{R} type=Instant @@ -102206,6 +102215,7 @@ text=When Seismic Elemental enters the battlefield, creatures without flying can mana={3}{R}{R} type=Creature subtype=Elemental +subtype=Elemental power=4 toughness=4 [/card] @@ -102441,8 +102451,8 @@ type=Artifact [/card] [card] name=Self-Assembler -aicode=activate notatarget(creature[Assembly-Worker]|mylibrary) moveTo(ownerhand) -auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature[Assembly-Worker]|mylibrary) optionone name(choose card) target(creature[Assembly-Worker]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend revealend +auto=notatarget(creature[Assembly-Worker]|mylibrary) moveTo(ownerhand) +#auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature[Assembly-Worker]|mylibrary) optionone name(choose card) target(creature[Assembly-Worker]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend revealend text=When Self-Assembler enters the battlefield, you may search your library for an Assembly-Worker creature card, reveal it, put it into your hand, then shuffle your library. mana={5} type=Artifact Creature @@ -103568,7 +103578,7 @@ toughness=1 name=Shadowborn Demon abilities=flying auto=destroy target(creature[-demon]) -auto=@each myupkeep:if type(creature|mygraveyard)~lessthan~6 then sacrifice +auto=@each myupkeep:if type(creature|mygraveyard)~lessthan~6 then sacrifice notatarget(creature|mybattlefield) text=Flying -- When Shadowborn Demon enters the battlefield, destroy target non-demon creature. -- At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature. mana={3}{B}{B} type=Creature @@ -105495,7 +105505,7 @@ name=Sight Beyond Sight abilities=hiddenface aicode=activate transforms((,newability[moveto(myhand) all(*[zpos=1]|mylibrary) && bottomoflibrary all(*[zpos=2]|mylibrary)])) ueot auto=name(look) reveal:2 optionone name(Get a card) target(<1>*|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<2>*|reveal) bottomoflibrary optiontwoend revealend -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={3}{U} type=Sorcery @@ -106356,7 +106366,7 @@ type=Instant [/card] [card] name=Sin Collector -auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(*[instant;sorcery]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(<1>*[instant;sorcery]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=When Sin Collector enters the battlefield target opponent reveals his or her hand. You choose an instant or a sorcery card from it and exile that card. mana={1}{W}{B} type=Creature @@ -110177,7 +110187,7 @@ toughness=3 [/card] [card] name=Soul Tithe -target=*[-land] +target=artifact,creature,enchantment,planeswalker auto=teach(*[manacost=1]) transforms((,newability[upcost[{1}] sacrifice])) auto=teach(*[manacost=2]) transforms((,newability[upcost[{2}] sacrifice])) auto=teach(*[manacost=3]) transforms((,newability[upcost[{3}] sacrifice])) @@ -112425,7 +112435,7 @@ type=Sorcery [/card] [card] name=Spreading Algae -target=swamp +target=land[swamp] auto=@tapped(mytgt):destroy autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand) text=Enchant Swamp -- When enchanted land becomes tapped, destroy it. -- When Spreading Algae is put into a graveyard from the battlefield, return Spreading Algae to its owner's hand. @@ -112861,7 +112871,7 @@ toughness=0 name=Staggershock target=creature,player auto=damage:2 -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Staggershock deals 2 damage to target creature or player. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={2}{R} type=Instant @@ -113254,7 +113264,7 @@ toughness=1 name=Stasis Cell target=creature text=Enchant creature -- Enchanted creature doesn't untap during its controller's untap step. -- {3}{U}: Attach Stasis Cell to target creature. -auto=doesnotuntap +auto=teach(creature) doesnotuntap auto={3}{U}:retarget target(creature) mana={4}{U} type=Enchantment @@ -113669,7 +113679,7 @@ type=Enchantment [card] name=Steppe Glider abilities=flying,vigilance -auto={w}{1}:target(creature[counter{1/1.1}]) transforms((newability[flying],newability[vigilance])) ueot +auto={w}{1}:target(creature[counter{1/1.1}]) transforms((,newability[flying],newability[vigilance])) ueot text=Flying, vigilance -- {1}{W}: Target creature with a +1/+1 counter on it gains flying and vigilance until end of turn. mana={4}{W} type=Creature @@ -116049,6 +116059,7 @@ type=Enchantment [/card] [card] name=Sunken Field +target=land auto=teach(land) {T}:name(counter spell) target(*|stack) transforms((,newability[pay[[{1}]] name(pay mana) donothing?fizzle])) forever text=Enchant land -- Enchanted land has "{T}: Counter target spell unless its controller pays {1}." mana={1}{U} @@ -116543,7 +116554,7 @@ toughness=1 [card] name=Surreal Memoir auto=moverandom(instant) from(mygraveyard) to(myhand) -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Return an instant card at random from your graveyard to your hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={3}{R} type=Sorcery @@ -116571,7 +116582,7 @@ type=Sorcery name=Survival Cache auto=life:2 controller auto=if compare(lifetotal)~morethan~compare(opponentlifetotal) then draw:1 controller -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=You gain 2 life. Then if you have more life than an opponent, draw a card. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={2}{W} type=Sorcery @@ -117611,7 +117622,7 @@ name=Taigam's Strike target=creature auto=2/0 ueot auto=unblockable ueot -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Target creature gets +2/+0 until end of turn and can't be blocked this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={3}{U} type=Sorcery @@ -122313,10 +122324,10 @@ type=Sorcery [/card] [card] name=Timetwister -auto=moveto(opponentgraveyard) all(*|opponenthand) +auto=moveto(opponentlibrary) all(*|opponenthand) auto=moveto(opponentlibrary) all(*|opponentgraveyard) && shuffle auto=draw:7 opponent -auto=moveto(mygraveyard) all(*|myhand) +auto=moveto(mylibrary) all(*|myhand) auto=moveto(mylibrary) all(*|mygraveyard) && shuffle auto=draw:7 controller text=Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards. (Then put Timetwister into its owner's graveyard.) @@ -124460,8 +124471,7 @@ toughness=3 [/card] [card] name=Triangle of War -auto={2}{S}:name(powerstrike) target(other creature|mybattlefield) transforms((,newability[dynamicability target(creature|opponentbattlefield)])) forever -restriction=type(creature|opponentbattlefield)~morethan~0 +auto={2}{S} restriction(type(creature|opponentbattlefield)~morethan~0):name(fight) target(creature|mybattlefield) transforms((,newability[dynamicability target(creature|opponentbattlefield)])) forever text={2}, Sacrifice Triangle of War: Target creature you control fights target creature an opponent controls. (Each deals damage equal to its power to the other.) mana={1} type=Artifact @@ -127278,7 +127288,7 @@ toughness=2 [/card] [card] name=Utopia Sprawl -target=forest +target=land[forest] auto=choice name(green) transforms((,newability[produceextra:{g}])) forever auto=choice name(blue) transforms((,newability[produceextra:{u}])) forever auto=choice name(red) transforms((,newability[produceextra:{r}])) forever @@ -129902,7 +129912,7 @@ name=Virulent Swipe target=creature auto=2/0 ueot auto=deathtouch ueot -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Target creature gets +2/+0 and gains deathtouch until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={B} type=Instant @@ -130484,7 +130494,7 @@ type=Sorcery name=Void Squall target=*[-land] auto=moveto(ownerhand) -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=Return target nonland permanent to its owner's hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={4}{U} type=Sorcery @@ -130753,7 +130763,7 @@ subtype=Aura [/card] [card] name=Volrath the Fallen -auto={D(creature|myhand)}:storedmanacost/storedmanacost ueot +auto={1}{B}{D(creature|myhand)}:storedmanacost/storedmanacost ueot text={1}{B}, Discard a creature card: Volrath the Fallen gets +X/+X until end of turn, where X is the discarded card's converted mana cost. mana={3}{B}{B}{B} type=Legendary Creature @@ -133434,7 +133444,7 @@ toughness=1 [/card] [card] name=Weldfast Engineer -auto=@each my combatbegins:target(artifact|mybattlefield) 2/0 ueot +auto=@each my combatbegins:target(artifact[creature]|mybattlefield) 2/0 ueot text=At the beginning of combat on your turn, target artifact creature you control gets +2/+0 until end of turn. mana={1}{B}{R} type=Creature @@ -136114,7 +136124,7 @@ toughness=2 name=World at War auto=nextphasealter(add,combatphaseswithmain,controller,after) auto=untap all(creature[attacking]) -auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! +auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! text=After the first postcombat main phase this turn, there's an additional combat phase followed by an additional main phase. At the beginning of that combat, untap all creatures that attacked this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) mana={3}{R}{R} type=Sorcery diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index c614d39d0..33a7178f1 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -15,6 +15,9 @@ typedef enum GAME_TYPE_MOMIR, GAME_TYPE_RANDOM1, GAME_TYPE_RANDOM2, + GAME_TYPE_RANDOM3, + GAME_TYPE_RANDOM5, + GAME_TYPE_HORDE, GAME_TYPE_STORY, GAME_TYPE_DEMO, GAME_TYPE_STONEHEWER, diff --git a/projects/mtg/include/Rules.h b/projects/mtg/include/Rules.h index fa8cdbd77..63adf3638 100644 --- a/projects/mtg/include/Rules.h +++ b/projects/mtg/include/Rules.h @@ -42,6 +42,9 @@ class Rules protected: Player * loadPlayerMomir(GameObserver* observer, int isAI); Player * loadPlayerRandom(GameObserver* observer, int isAI, int mode); + Player * loadPlayerRandomThree(GameObserver* observer, int isAI); + Player * loadPlayerRandomFive(GameObserver* observer, int isAI); + Player * loadPlayerHorde(GameObserver* observer, int isAI); Player * initPlayer(GameObserver *observer, int playerId); MTGDeck * buildDeck(int playerId); GameType strToGameMode(string s); diff --git a/projects/mtg/include/Wagic_Version.h b/projects/mtg/include/Wagic_Version.h index 58f7175d4..62e70ff91 100644 --- a/projects/mtg/include/Wagic_Version.h +++ b/projects/mtg/include/Wagic_Version.h @@ -12,7 +12,7 @@ Author: Michael Nguyen /* Wagic versions */ #define WAGIC_VERSION_MAJOR 0 -#define WAGIC_VERSION_MEDIUM 20 +#define WAGIC_VERSION_MEDIUM 21 #define WAGIC_VERSION_MINOR 1 #define VERSION_DOT(a, b, c) a ##.## b ##.## c diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index 690bcf67d..9be36ffac 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -46,14 +46,15 @@ int OrderedAIAction::getEfficiency(AADamager * aad) return 0; } - if(p == target->controller()) - return 0; + if(p && target) + if(p == target->controller()) + return 0; if (dTarget && aad && (aad->getDamage() >= dTarget->toughness)) return 100; if (dTarget && dTarget->toughness) - return (50 * aad->getDamage()) / dTarget->toughness; + return (10 * aad->getDamage()) / dTarget->toughness; // Don't waste damage spells return 0; } @@ -129,8 +130,12 @@ int OrderedAIAction::getEfficiency() { efficiency = 95; } - //TODO If the card is the target of a damage spell - break; + //TODO If the card is the target of a damage spell + if (!coreAbilityCardTarget->regenerateTokens && (MTGCardInstance*)target == a->source) + { + efficiency = 95; + } + break; } case MTGAbility::STANDARD_PREVENT: { @@ -271,7 +276,7 @@ int OrderedAIAction::getEfficiency() } case MTGAbility::STANDARD_PUMP: { - efficiency = 0; + efficiency = 0; if(!coreAbilityCardTarget) break; if(!target && !dynamic_cast (a) && (((MTGCardInstance *)a->source)->hasSubtype(Subtypes::TYPE_AURA) || ((MTGCardInstance *)a->source)->hasSubtype(Subtypes::TYPE_EQUIPMENT))) @@ -291,9 +296,9 @@ int OrderedAIAction::getEfficiency() int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY); //i do not set a starting eff. on this ability, this allows Ai to sometimes randomly do it as it normally does. int currentPhase = g->getCurrentGamePhase(); - if ((currentPhase == MTG_PHASE_COMBATBLOCKERS) || (currentPhase == MTG_PHASE_COMBATATTACKERS)) + if (suggestion == BAKA_EFFECT_GOOD && target->controller() == p) { - if (suggestion == BAKA_EFFECT_GOOD && target->controller() == p) + if ((currentPhase == MTG_PHASE_COMBATBLOCKERS) || (currentPhase == MTG_PHASE_COMBATATTACKERS)) { if(coreAbilityCardTarget->defenser || coreAbilityCardTarget->blockers.size()) { @@ -315,6 +320,10 @@ int OrderedAIAction::getEfficiency() efficiency -= coreAbilityCardTarget->power;//we don't need to go overboard. better to not put all your eggs in a single basket. } } + if (currentPhase == MTG_PHASE_FIRSTMAIN) + { + efficiency = 10; + } } if (suggestion == BAKA_EFFECT_BAD && target->controller() != p && target->toughness > 0) { @@ -326,28 +335,41 @@ int OrderedAIAction::getEfficiency() { if(!coreAbilityCardTarget) break; - + // It used to skip most effects, with no other condition efficiency is -1 + // Becomes is generally good so setting a value, but don't want to spam it + if (coreAbilityCardTarget && !coreAbilityCardTarget->isLand()) + { + // Bonus if almost no cards in hand + if (p->game->hand->nb_cards <= 1) + { + efficiency = 60; + } + else efficiency = 30; + } //nothing huge here, just ensuring that Ai makes his noncreature becomers into creatures during first main, so it can actually use them in combat. if (coreAbilityCardTarget && !coreAbilityCardTarget->isCreature() && currentPhase == MTG_PHASE_FIRSTMAIN) { - efficiency = 100; - } + efficiency = 60; + } break; } case MTGAbility::MANA_PRODUCER://only way to hit this condition is nested manaabilities, ai skips manaproducers by defualt when finding an ability to use. { - AManaProducer * manamaker = dynamic_cast(a); - GenericActivatedAbility * GAA = dynamic_cast(ability); - AForeach * forMana = dynamic_cast(GAA->ability); - if (manamaker && forMana) - { - int outPut = forMana->checkActivation(); - if (ability->getCost() && outPut > int(ability->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability->source->controller()->game->hand->nb_cards > 1) - efficiency = 90;//might be a bit random, but better than never using them. - } - else - efficiency = 0; - break; + AManaProducer * manamaker = dynamic_cast(a); + GenericActivatedAbility * GAA = dynamic_cast(ability); + if(GAA) + { + AForeach * forMana = dynamic_cast(GAA->ability); + if (manamaker && forMana) + { + int outPut = forMana->checkActivation(); + if (ability->getCost() && outPut > int(ability->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability->source->controller()->game->hand->nb_cards > 1) + efficiency = 60;//might be a bit random, but better than never using them. + } + } + else + efficiency = 0; + break; } case MTGAbility::STANDARDABILITYGRANT: { @@ -426,11 +448,12 @@ int OrderedAIAction::getEfficiency() case MTGAbility::LIFER: { - //use life abilities whenever possible. + //use life abilities whenever possible. Well yes, but actually no + //limits mana and in case of Zuran Orb it just sacrifices all lands AALifer * alife = (AALifer *) a; Targetable * _t = alife->getTarget(); - efficiency = 100; + efficiency = 80; AbilityFactory af(g); int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY); @@ -566,6 +589,12 @@ int OrderedAIAction::getEfficiency() { if (z == p->game->hand) efficiency = 10 + (owner->getRandomGenerator()->random() % 10);//random chance to bounce their own card; + } + // We don't want to return cards in play to own hand, save rare combos + else if(target->currentZone == p->game->inPlay) + { + if (z == p->game->hand || z == p->game->library) + efficiency = (owner->getRandomGenerator()->random() % 10);//random chance to bounce their own card; } else { @@ -574,7 +603,11 @@ int OrderedAIAction::getEfficiency() } else { - efficiency = 50; + // We don't want to return the ability source cards in play to own hand, save rare combos + // cards like Blinking Spirit use to be auto lose for AI + if(z == p->game->hand || z == p->game->library) + efficiency = 1; + else efficiency = 50; //may abilities target the source until thier nested ability is activated, so 50% chance to use this //mover, until we can come up with something more elegent.... } @@ -639,7 +672,7 @@ int OrderedAIAction::getEfficiency() { AIPlayer * chk = (AIPlayer*)p; if(may->ability && may->ability->getActionTc() && chk->chooseTarget(may->ability->getActionTc(),NULL,NULL,true)) - efficiency = 50 + (owner->getRandomGenerator()->random() % 50); + efficiency = 80 + (owner->getRandomGenerator()->random() % 50); } if (p->game->hand->nb_cards == 0) efficiency = (int) ((float) efficiency * 1.3); //increase chance of using ability if hand is empty @@ -666,13 +699,18 @@ int OrderedAIAction::getEfficiency() } else if (dynamic_cast(a)) { - efficiency += 55; + efficiency += 65; } else if (dynamic_cast(a)) { efficiency += 55; } - SAFE_DELETE(transAbility); + + if (ability->source) + if(ability->source->hasType(Subtypes::TYPE_PLANESWALKER)) + efficiency += 50; + + SAFE_DELETE(transAbility); return efficiency; } @@ -944,7 +982,7 @@ int OrderedAIAction::getRevealedEfficiency(MTGAbility * ability2) //nothing huge here, just ensuring that Ai makes his noncreature becomers into creatures during first main, so it can actually use them in combat. if (coreAbilityCardTarget && !coreAbilityCardTarget->isCreature() && currentPhase == MTG_PHASE_FIRSTMAIN) { - eff2 = 100; + eff2 = 70; } break; } @@ -957,7 +995,7 @@ int OrderedAIAction::getRevealedEfficiency(MTGAbility * ability2) { int outPut = forMana->checkActivation(); if (ability2->getCost() && outPut > int(ability2->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability2->source->controller()->game->hand->nb_cards > 1) - eff2 = 90;//might be a bit random, but better than never using them. + eff2 = 60;//might be a bit random, but better than never using them. } else eff2 = 0; @@ -2447,11 +2485,10 @@ int AIPlayerBaka::getEfficiency(MTGAbility * ability) int AIPlayerBaka::selectMenuOption() { ActionLayer * object = observer->mLayers->actionLayer(); - int doThis = -1; + int doThis = 0; // The AI just passes on things if set to -1, getEfficiency should be improved if (object->menuObject) { int checkedLast = 0; - if(object->abilitiesMenu->isMultipleChoice && object->currentActionCard) { MenuAbility * currentMenu = NULL; @@ -2510,7 +2547,7 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty { nextCardToPlay = comboCards.back(); gotPayments.clear(); - if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker())) + if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker() || nextCardToPlay->getManaCost()->getBestow())) gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost()); DebugTrace("ai is doing a combo:" << nextCardToPlay->getName()); comboCards.pop_back(); @@ -2524,11 +2561,26 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty card = NULL; gotPayments = vector(); //canplayfromgraveyard - while ((card = cd.nextmatch(game->graveyard, card))&& card->has(Constants::CANPLAYFROMGRAVEYARD)) - { + while ((card = cd.nextmatch(game->graveyard, card))) + { + bool hasFlashback = false; + + if(card->getManaCost()) + if(card->getManaCost()->getFlashback()) + hasFlashback = true; + + if( card->has(Constants::CANPLAYFROMGRAVEYARD) || card->has(Constants::TEMPFLASHBACK) || hasFlashback ) + { if (!CanHandleCost(card->getManaCost(),card)) continue; + if (hasFlashback && !CanHandleCost(card->getManaCost()->getFlashback(),card)) + continue; + + // Case were manacost is equal to flashback cost, if they are different the AI hangs + if (hasFlashback && (card->getManaCost() != card->getManaCost()->getFlashback()) ) + continue; + if (card->hasType(Subtypes::TYPE_LAND)) { if (game->playRestrictions->canPutIntoZone(card, game->inPlay) == PlayRestriction::CANT_PLAY) @@ -2619,27 +2671,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty } else { - int shouldPlay = effectBadOrGood(card); - if (shouldPlay == BAKA_EFFECT_GOOD) + // Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW + // If it is a land, play it + if (card->isLand()) { shouldPlayPercentage = 90; - } - else if (BAKA_EFFECT_DONTKNOW == shouldPlay) - { - //previously shouldPlayPercentage = 80;, I found this a little to high - //for cards which AI had no idea how to use. - shouldPlayPercentage = 60; - } - else if (card->isLand()) - { - shouldPlayPercentage = 90; - } - else - { - // shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance. - shouldPlayPercentage = 1; - } - + } + else { + int shouldPlay = effectBadOrGood(card); + if (shouldPlay == BAKA_EFFECT_GOOD) { + shouldPlayPercentage = 90; + } + else if (BAKA_EFFECT_DONTKNOW == shouldPlay) { + //previously shouldPlayPercentage = 80;, I found this a little to high + //for cards which AI had no idea how to use. + shouldPlayPercentage = 60; + } + else { + // shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance. + shouldPlayPercentage = 10; + } + } } //Reduce the chances of playing a spell with X cost if available mana is low if (hasX) @@ -2677,6 +2729,7 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty if (hasX) maxCost = pMana->getConvertedCost(); } + } } //canplayfromexile while ((card = cd.nextmatch(game->exile, card))&& card->has(Constants::CANPLAYFROMEXILE)) @@ -2774,27 +2827,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty } else { - int shouldPlay = effectBadOrGood(card); - if (shouldPlay == BAKA_EFFECT_GOOD) + // Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW + // If it is a land, play it + if (card->isLand()) { shouldPlayPercentage = 90; - } - else if (BAKA_EFFECT_DONTKNOW == shouldPlay) - { - //previously shouldPlayPercentage = 80;, I found this a little to high - //for cards which AI had no idea how to use. - shouldPlayPercentage = 60; - } - else if (card->isLand()) - { - shouldPlayPercentage = 90; - } - else - { - // shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance. - shouldPlayPercentage = 1; - } - + } + else { + int shouldPlay = effectBadOrGood(card); + if (shouldPlay == BAKA_EFFECT_GOOD) { + shouldPlayPercentage = 90; + } + else if (BAKA_EFFECT_DONTKNOW == shouldPlay) { + //previously shouldPlayPercentage = 80;, I found this a little to high + //for cards which AI had no idea how to use. + shouldPlayPercentage = 60; + } + else { + // shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance. + shouldPlayPercentage = 10; + } + } } //Reduce the chances of playing a spell with X cost if available mana is low if (hasX) @@ -2928,27 +2981,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty } else { - int shouldPlay = effectBadOrGood(card); - if (shouldPlay == BAKA_EFFECT_GOOD) + // Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW + // If it is a land, play it + if (card->isLand()) { shouldPlayPercentage = 90; - } - else if (BAKA_EFFECT_DONTKNOW == shouldPlay) - { - //previously shouldPlayPercentage = 80;, I found this a little to high - //for cards which AI had no idea how to use. - shouldPlayPercentage = 60; - } - else if (card->isLand()) - { - shouldPlayPercentage = 90; - } - else - { - // shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance. - shouldPlayPercentage = 1; - } - + } + else { + int shouldPlay = effectBadOrGood(card); + if (shouldPlay == BAKA_EFFECT_GOOD) { + shouldPlayPercentage = 90; + } + else if (BAKA_EFFECT_DONTKNOW == shouldPlay) { + //previously shouldPlayPercentage = 80;, I found this a little to high + //for cards which AI had no idea how to use. + shouldPlayPercentage = 60; + } + else { + // shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance. + shouldPlayPercentage = 10; + } + } } //Reduce the chances of playing a spell with X cost if available mana is low if (hasX) diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 7e4216ba1..341370d2e 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -463,7 +463,7 @@ void CardGui::Render() string buff = ""; string starMark = ""; if(card->exerted) - starMark += "*"; + starMark += "exerted"; if(card->isToken && !card->isACopier) buff = "T"; if(card->isToken && card->isACopier) diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index 49910a602..1e0fea9db 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -417,10 +417,11 @@ ManaCost* CardPrimitive::getManaCost() bool CardPrimitive::hasType(int _type) { - for (size_t i = 0; i < types.size(); i++) - if (types[i] == _type) - return true; - return false; + if (types.size() > 400) {return false;} // Null pointer? + for (size_t i = 0; i < types.size(); i++) + if (types[i] == _type) + return true; + return false; } bool CardPrimitive::hasSubtype(int _subtype) diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index 0e7a2a56e..816b1ef65 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -770,7 +770,10 @@ void GameStateDuel::Update(float dt) musictrack = "ai_baka_music_momir.mp3"; else if (mParent->gameType == GAME_TYPE_RANDOM1 || mParent->gameType == GAME_TYPE_RANDOM2) musictrack = "ai_baka_music_random.mp3"; - + else if (mParent->gameType == GAME_TYPE_RANDOM3 || mParent->gameType == GAME_TYPE_RANDOM5) musictrack + = "ai_baka_music_random.mp3"; + else if (mParent->gameType == GAME_TYPE_HORDE) musictrack + = "ai_baka_music_momir.mp3"; if (!MusicExist(musictrack)) musictrack = "ai_baka_music.mp3"; diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index 01d88fef4..b5a49fa2e 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -312,7 +312,7 @@ void GuiPlay::Render() MTGCardInstance * ctarget = ((MTGCardInstance *)(*it)->card->isAttacking); if(ctarget->hasType(Subtypes::TYPE_PLANESWALKER) && observer->isInPlay(ctarget) && observer->getCurrentGamePhase() < MTG_PHASE_COMBATEND) { - JRenderer::GetInstance()->DrawLine((*it)->actX,(*it)->actY,ctarget->view->actX,ctarget->view->actY,0.5f,ARGB(128 - wave, 255, 20, 0)); + JRenderer::GetInstance()->DrawLine((*it)->actX,(*it)->actY,ctarget->view->actX,ctarget->view->actY,0.5f,ARGB(128 - wave, 255, 40, 40)); } } } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index eb359bbda..7c0ae786e 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1835,7 +1835,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG tc->targetter = NULL; } else - tc->targetter->bypassTC = false; + if (tc->targetter) + tc->targetter->bypassTC = false; sWithoutTc = splitTarget[0]; sWithoutTc.append(splitTarget[2]); } @@ -1935,7 +1936,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { if (!(spell && spell->FullfilledAlternateCost(kAlternateCostIds[i]))) { - DebugTrace("INFO parseMagicLine: Alternative Cost was not fulfilled for " << s); + DebugTrace("INFO parseMagicLine: Alternative Cost was not fulfilled for " << spell << s); SAFE_DELETE(tc); return NULL; } @@ -3512,7 +3513,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG //produce additional mana when a mana is engaged if (s.find("producecolor:") != string::npos) - { + { return NEW AEngagedManaAbility(observer, id, card,s.substr(13)); } @@ -4094,13 +4095,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return NEW ANewAffinity(observer, id, card, tcString, manaString); } - //proliferate + //proliferate, rule changes in War of the Spark set found = s.find("proliferate"); if (found != string::npos) { MTGAbility * a = NEW AAProliferate(observer, id, card, target); a->oneShot = 1; a->canBeInterrupted = false; + ((AAProliferate*)a)->allcounters = true; return a; } //proliferate all counters @@ -4545,6 +4547,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ return BAKA_EFFECT_BAD; if (dynamic_cast (a)) return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_BAD; // Equipment that gets immediately attached. Todo: check the abilities associated with Equip, to make sure they're good (for now it seems to be the majority of the cases)? if (dynamic_cast (a)) @@ -4568,12 +4572,12 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ if (AAMover * aam = dynamic_cast(a)) { MTGGameZone * z = aam->destinationZone(target); - if (tc && tc->targetsZone(p->game->library)) + if (tc && tc->targetsZone(p->game->library)||tc && tc->targetsZone(p->game->graveyard)) { if (z == p->game->hand || z == p->game->inPlay) return BAKA_EFFECT_GOOD; } - return BAKA_EFFECT_BAD; //TODO + return BAKA_EFFECT_DONTKNOW; //TODO } if (dynamic_cast (a)) @@ -4598,6 +4602,31 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ return BAKA_EFFECT_GOOD; if (dynamic_cast (a)) return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_BAD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (dynamic_cast (a)) + return BAKA_EFFECT_GOOD; + if (PTInstant * abi = dynamic_cast(a)) return (abi->wppt->power.getValue() >= 0 && abi->wppt->toughness.getValue() >= 0) ? BAKA_EFFECT_GOOD : BAKA_EFFECT_BAD; if (APowerToughnessModifier * abi = dynamic_cast(a)) @@ -4628,6 +4657,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ badAbilities[(int)Constants::NOLIFEGAINOPPONENT] = true; badAbilities[(int)Constants::MUSTBLOCK] = true; badAbilities[(int)Constants::FLYERSONLY] = true; + badAbilities[(int)Constants::TREASON] = true; + badAbilities[(int)Constants::SHACKLER] = true; if (AInstantBasicAbilityModifierUntilEOT * abi = dynamic_cast(a)) { @@ -4694,7 +4725,7 @@ int AbilityFactory::getAbilities(vector * v, Spell * spell, MTGCar card->exileEffects = true; break; } - if (dest == zones->library) + if (dest == zones->library) { magicText = card->magicTexts["library"]; break; @@ -4788,7 +4819,7 @@ int AbilityFactory::getAbilities(vector * v, Spell * spell, MTGCar } else { - DebugTrace("ABILITYFACTORY ERROR: Parser returned NULL"); + DebugTrace("ABILITYFACTORY ERROR: Parser returned NULL " + magicText); } } return result; @@ -4804,7 +4835,7 @@ int AbilityFactory::getAbilities(vector * v, Spell * spell, MTGCar * - doTap (a dirty way to know if tapping is included in the cost... */ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int mode, TargetChooser * tc, MTGGameZone * dest) -{ +{try{ int dryMode = 0; if (!spell && !dest) dryMode = 1; @@ -4888,6 +4919,11 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int } return result; + } + catch(exception) { + DebugTrace("MAGIC TEST ERROR: Parser returned NULL"); + } + return 0; } void AbilityFactory::addAbilities(int _id, Spell * spell) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index bac2dffc3..8d2348dc7 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -505,6 +505,20 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card) } delete withKickerCost; } + if (card->getManaCost()->getBestow()) + { + ManaCost * withBestowCost= NEW ManaCost(card->getManaCost()); + withBestowCost->add(withBestowCost->getBestow()); + + DebugTrace("AltCost BESTOW " << withBestowCost); + if (previousManaPool->canAfford(withBestowCost)) + { + player->getManaPool()->pay(card->getManaCost()->getBestow()); + payResult = ManaCost::MANA_PAID_WITH_BESTOW; + } + delete withBestowCost; + } + card->getManaCost()->doPayExtra(); ManaCost * spellCost = previousManaPool->Diff(player->getManaPool()); @@ -652,6 +666,19 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card) payResult = ManaCost::MANA_PAID_WITH_KICKER; } delete withKickerCost; + } + // Handles bestow,also has to go in isExtraPaymentSet + if (card->getManaCost()->getBestow()) + { + ManaCost * withBestowCost= NEW ManaCost(card->getManaCost()); + withBestowCost->add(withBestowCost->getBestow()); + + if (previousManaPool->canAfford(withBestowCost)) + { + player->getManaPool()->pay(card->getManaCost()->getBestow()); + payResult = ManaCost::MANA_PAID_WITH_BESTOW; + } + delete withBestowCost; } card->getManaCost()->doPayExtra(); ManaCost * spellCost = previousManaPool->Diff(player->getManaPool()); @@ -3486,7 +3513,7 @@ PermanentAbility(observer, _id) } int MTGNewPlaneswalker::receiveEvent(WEvent * e) -{ +{ if(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer()) return 0; if (WEventZoneChange* ev1 = dynamic_cast(e)) @@ -3494,7 +3521,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e) if (ev1->to == game->players[0]->game->inPlay || ev1->to == game->players[1]->game->inPlay) { MTGCardInstance * card = ev1->card; - if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) + if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY)) { CheckPW(card); return 1; @@ -3504,7 +3531,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e) else if(WEventCardControllerChange* ev2 = dynamic_cast(e)) { MTGCardInstance * card = ev2->card; - if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) + if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY)) { CheckPW(card); return 1; @@ -3513,7 +3540,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e) else if(WEventCardTransforms* ev3 = dynamic_cast(e)) { MTGCardInstance * card = ev3->card; - if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) + if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY)) { CheckPW(card); return 1; @@ -3522,7 +3549,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e) else if(WEventCardCopiedACard* ev4 = dynamic_cast(e)) { MTGCardInstance * card = ev4->card; - if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) + if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY)) { CheckPW(card); return 1; @@ -3531,7 +3558,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e) else if(WEventCardFaceUp* ev5 = dynamic_cast(e)) { MTGCardInstance * card = ev5->card; - if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) + if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY)) { CheckPW(card); return 1; @@ -3540,7 +3567,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e) else if(WEventCardPhasesIn* ev6 = dynamic_cast(e)) { MTGCardInstance * card = ev6->card; - if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) + if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY)) { CheckPW(card); return 1; @@ -3550,23 +3577,26 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e) } int MTGNewPlaneswalker::CheckPW(MTGCardInstance * card) { - if(!card) + if(!card) return 0; if(card->isPhased) return 0; - if(card->countDuplicateCardTypes() < 1) + if (card->hasType(Subtypes::TYPE_LEGENDARY) && card->controller()->game->inPlay->hasCard(card)) + if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasAbility(Constants::NOLEGENDRULE)||card->controller()->inPlay()->hasAbility(Constants::NOLEGENDRULE)) + return 0; + if(card->countDuplicateCardNames() <= 2) return 0; MovePW(card); return 1; } void MTGNewPlaneswalker::MovePW(MTGCardInstance * card) -{ +{ game->LPWeffect = true; vectorselection; MTGCardInstance * myClone = NEW MTGCardInstance(card, card->controller()->game); TargetChooserFactory tfL(game); - tcP = tfL.createTargetChooser("planeswalker[share!types!]|mybattlefield",myClone); + tcP = tfL.createTargetChooser("*[share!name!]|mybattlefield",myClone); tcP->targetter = NULL; tcP->maxtargets = 1; PWrule = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), myClone, NULL,"ownergraveyard","Put in Graveyard"); @@ -3679,24 +3709,27 @@ ListMaintainerAbility(observer, _id) int MTGPlaneWalkerRule::canBeInList(MTGCardInstance * card) { - if(card->isPhased) + if(card->isPhased) return 0; - if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->controller()->game->inPlay->hasCard(card)) + if (card->hasType(Subtypes::TYPE_LEGENDARY) && card->controller()->game->inPlay->hasCard(card)) { - return 1; + if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasAbility(Constants::NOLEGENDRULE)||card->controller()->inPlay()->hasAbility(Constants::NOLEGENDRULE)) + return 0; + else + return 1; } return 0; } int MTGPlaneWalkerRule::added(MTGCardInstance * card) { - map::iterator it; + map::iterator it; int destroy = 0; vectoroldCards; for (it = cards.begin(); it != cards.end(); it++) { MTGCardInstance * comparison = (*it).first; - if (comparison != card && comparison->types == card->types && comparison->controller() == card->controller()) + if (comparison != card && comparison->controller() == card->controller() && !(comparison->getName().compare(card->getName()))) if (!(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer())) { oldCards.push_back(comparison); @@ -3704,11 +3737,10 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card) game->LPWeffect = true; } } - if (destroy) + if(destroy) { vectorselection; - - MultiAbility * multi = NEW MultiAbility(game,game->mLayers->actionLayer()->getMaxId(), card, card, NULL); + MultiAbility * multi = NEW MultiAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card, NULL); for(unsigned int i = 0;i < oldCards.size();i++) { AAMover *a = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New"); @@ -3722,7 +3754,7 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card) b->oneShot = true; MTGAbility * b1 = b; selection.push_back(b1); - MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Planeswalker Rule"); + MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule"); menuChoice->addToGame(); } return 1; diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index 05ee90278..654539691 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -579,6 +579,8 @@ int ManaCost::hasAnotherCost() if(kicker) result = 1; //kicker is the only one ai knows for now, later hasAnotherCost() can be used to determine other cost types. + if(Retrace || BuyBack || alternative || FlashBack || morph || suspend || Bestow) + result = 1; return result; } @@ -730,7 +732,7 @@ int ManaCost::getCost(int color) { if (cost.size() <= (size_t)color) { - DebugTrace("Seems ManaCost was not properly initialized"); + DebugTrace("in GetCost Seems ManaCost was not properly initialized"); return 0; } return cost[color]; diff --git a/projects/mtg/src/Rules.cpp b/projects/mtg/src/Rules.cpp index 1fb5c3afd..405cc0c98 100644 --- a/projects/mtg/src/Rules.cpp +++ b/projects/mtg/src/Rules.cpp @@ -168,6 +168,10 @@ void Rules::addExtraRules(GameObserver* g) difficultyRating = 0; else if(g->mRules->gamemode == GAME_TYPE_RANDOM1 || g->mRules->gamemode == GAME_TYPE_RANDOM2) difficultyRating = 0; + else if(g->mRules->gamemode == GAME_TYPE_RANDOM3 || g->mRules->gamemode == GAME_TYPE_RANDOM5) + difficultyRating = 0; + else if(g->mRules->gamemode == GAME_TYPE_HORDE) + difficultyRating = 0; else if (g->mRules->gamemode == GAME_TYPE_STORY) difficultyRating = 0; else if (a->aType == MTGAbility::STANDARD_DRAW) @@ -196,9 +200,11 @@ void Rules::addExtraRules(GameObserver* g) a->resolve(); else if(g->mRules->gamemode == GAME_TYPE_RANDOM1 || g->mRules->gamemode == GAME_TYPE_RANDOM2) a->resolve(); + else if(g->mRules->gamemode == GAME_TYPE_RANDOM3 || g->mRules->gamemode == GAME_TYPE_RANDOM5) + a->resolve(); else if (g->mRules->gamemode == GAME_TYPE_STORY) a->resolve(); - else//stupid protections to keep this out of mimor and other game modes. + else//stupid protections to keep this out of momir and other game modes. { handsize = ((AADrawer *)a)->getNumCards(); if(difficultyRating == EASY) @@ -305,6 +311,154 @@ Player * Rules::loadPlayerRandom(GameObserver* observer, int isAI, int mode) return player; } +Player * Rules::loadPlayerRandomThree(GameObserver* observer, int isAI) +{ + int color1 = 1 + observer->getRandomGenerator()->random() % 5; + int color2 = 1 + observer->getRandomGenerator()->random() % 5; + int color3 = 1 + observer->getRandomGenerator()->random() % 5; + int color0 = Constants::MTG_COLOR_ARTIFACT; + + int colors[] = { color1, color2, color3, color0 }; + int nbcolors = 4; + + string lands[] = { "", "forest", "island", "mountain", "swamp", "plains", "" }; + + MTGDeck * tempDeck = NEW MTGDeck(MTGCollection()); + tempDeck->addRandomCards(1, 0, 0, -1, lands[color1].c_str()); + tempDeck->addRandomCards(1, 0, 0, -1, lands[color2].c_str()); + tempDeck->addRandomCards(1, 0, 0, -1, lands[color3].c_str()); + tempDeck->addRandomCards(6, 0, 0, 'R', lands[color1].c_str()); + tempDeck->addRandomCards(6, 0, 0, 'R', lands[color2].c_str()); + tempDeck->addRandomCards(6, 0, 0, 'R', lands[color3].c_str()); + tempDeck->addRandomCards(3, 0, 0, -1, "land"); + tempDeck->addRandomCards(1, 0, 0, 'U', "land"); + tempDeck->addRandomCards(1, 0, 0, 'R', "land"); + tempDeck->addRandomCards(18, 0, 0, -1, "creature", colors, nbcolors); + tempDeck->addRandomCards(1, 0, 0, 'R', "creature", colors, nbcolors); + tempDeck->addRandomCards(1, 0, 0, 'M', "creature", colors, nbcolors); + tempDeck->addRandomCards(3, 0, 0, -1, "sorcery", colors, nbcolors); + tempDeck->addRandomCards(3, 0, 0, -1, "enchantment", colors, nbcolors); + tempDeck->addRandomCards(3, 0, 0, -1, "instant", colors, nbcolors); + tempDeck->addRandomCards(4, 0, 0, -1, "artifact", colors, nbcolors); + tempDeck->addRandomCards(1, 0, 0, -1, "planeswalker", colors, nbcolors); + + string deckFile = "random"; + string deckFileSmall = "random"; + + Player *player = NULL; + if (!isAI) // Human Player + player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck); + else + player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck); + + return player; +} + +Player * Rules::loadPlayerRandomFive(GameObserver* observer, int isAI) +{ + MTGDeck * tempDeck = NEW MTGDeck(MTGCollection()); + tempDeck->addRandomCards(1, 0, 0, -1, "plains"); + tempDeck->addRandomCards(1, 0, 0, -1, "island"); + tempDeck->addRandomCards(1, 0, 0, -1, "swamp"); + tempDeck->addRandomCards(1, 0, 0, -1, "mountain"); + tempDeck->addRandomCards(1, 0, 0, -1, "forest"); + tempDeck->addRandomCards(3, 0, 0, 'R', "plains"); + tempDeck->addRandomCards(3, 0, 0, 'R', "island"); + tempDeck->addRandomCards(3, 0, 0, 'R', "swamp"); + tempDeck->addRandomCards(3, 0, 0, 'R', "mountain"); + tempDeck->addRandomCards(3, 0, 0, 'R', "forest"); + tempDeck->addRandomCards(4, 0, 0, -1, "land"); + tempDeck->addRandomCards(1, 0, 0, 'U', "land"); + tempDeck->addRandomCards(1, 0, 0, 'R', "land"); + tempDeck->addRandomCards(18, 0, 0, -1, "creature"); + tempDeck->addRandomCards(1, 0, 0, 'R', "creature"); + tempDeck->addRandomCards(1, 0, 0, 'M', "creature"); + tempDeck->addRandomCards(3, 0, 0, -1, "sorcery"); + tempDeck->addRandomCards(3, 0, 0, -1, "enchantment"); + tempDeck->addRandomCards(3, 0, 0, -1, "instant"); + tempDeck->addRandomCards(4, 0, 0, -1, "artifact"); + tempDeck->addRandomCards(1, 0, 0, -1, "planeswalker"); + + string deckFile = "random"; + string deckFileSmall = "random"; + + Player *player = NULL; + if (!isAI) // Human Player + player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck); + else + player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck); + + return player; +} + +Player * Rules::loadPlayerHorde(GameObserver* observer, int isAI) +{ + int nbColors = 1; + string randomTribe = ""; + int tribeColor[] = { observer->getRandomGenerator()->random() % 6 }; + + string lands[] = { "land", "forest", "island", "mountain", "swamp", "plains" }; + + const char* const multicolorTribes[] = { "Ally", "Atog", "Eldrazi", "Elemental", "Human", "Knight", + "Myr", "Samurai", "Shaman", "Shapeshifter", "Sliver", "Soldier", "Spellshaper" }; + const char* const whiteTribes[] = { "Angel","Cat", "Griffin", "Kithkin", "Knight", "Pegasus", "Soldier" }; + const char* const blueTribes[] = { "Artificer", "Merfolk", "Drake", "Faerie", "Illusion", "Vedalken" }; + const char* const blackTribes[] = { "Demon", "Faerie", "Horror", "Pirate", "Rat", "Shade", "Skeleton", "Vampire", "Zombie" }; + const char* const redTribes[] = { "Barbarian", "Berserker","Cat", "Devil", "Goblin", "Minotaur", "Werewolf" }; + const char* const greenTribes[] = { "Beast", "Cat", "Centaur", "Dinosaur", "Druid", "Elf", "Fungus", + "Saproling", "Spider", "Treefolk", "Werewolf" }; + + int multicolorTribesSize = sizeof(multicolorTribes)/sizeof(multicolorTribes[0]); + int whiteTribesSize = sizeof(whiteTribes)/sizeof(whiteTribes[0]); + int blueTribesSize = sizeof(blueTribes)/sizeof(blueTribes[0]); + int blackTribesSize = sizeof(blackTribes)/sizeof(blackTribes[0]); + int redTribesSize = sizeof(redTribes)/sizeof(redTribes[0]); + int greenTribesSize = sizeof(greenTribes)/sizeof(greenTribes[0]); + + switch (tribeColor[0]) + { + case Constants::MTG_COLOR_ARTIFACT : + randomTribe = multicolorTribes[observer->getRandomGenerator()->random() % multicolorTribesSize]; + nbColors = 0; + break; + case Constants::MTG_COLOR_WHITE : + randomTribe = whiteTribes[observer->getRandomGenerator()->random() % whiteTribesSize]; + break; + case Constants::MTG_COLOR_BLUE : + randomTribe = blueTribes[observer->getRandomGenerator()->random() % blueTribesSize]; + break; + case Constants::MTG_COLOR_BLACK : + randomTribe = blackTribes[observer->getRandomGenerator()->random() % blackTribesSize]; + break; + case Constants::MTG_COLOR_RED : + randomTribe = redTribes[observer->getRandomGenerator()->random() % redTribesSize]; + break; + case Constants::MTG_COLOR_GREEN : + randomTribe = greenTribes[observer->getRandomGenerator()->random() % greenTribesSize]; + break; + } + + MTGDeck * tempDeck = NEW MTGDeck(MTGCollection()); + tempDeck->addRandomCards(16, 0, 0, -1, lands[tribeColor[0]].c_str()); + tempDeck->addRandomCards(4, 0, 0, 'R', lands[tribeColor[0]].c_str()); + tempDeck->addRandomCards(4, 0, 0, -1, "land"); + tempDeck->addRandomCards(21, 0, 0, -1, randomTribe); + tempDeck->addRandomCards(5, 0, 0, -1, "enchantment", tribeColor, nbColors); + tempDeck->addRandomCards(5, 0, 0, -1, "instant", tribeColor, nbColors); + tempDeck->addRandomCards(5, 0, 0, -1, "sorcery", tribeColor, nbColors); + + string deckFile = "random"; + string deckFileSmall = "random"; + + Player *player = NULL; + if (!isAI) // Human Player + player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck); + else + player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck); + + return player; +} + Player * Rules::initPlayer(GameObserver *g, int playerId) { Player * p = g->players.size() > 1?g->players[playerId]:NULL; @@ -322,6 +476,12 @@ Player * Rules::initPlayer(GameObserver *g, int playerId) return loadPlayerRandom(g, isAI, GAME_TYPE_RANDOM1); case GAME_TYPE_RANDOM2: return loadPlayerRandom(g, isAI, GAME_TYPE_RANDOM2); + case GAME_TYPE_RANDOM3: + return loadPlayerRandomThree(g, isAI); + case GAME_TYPE_RANDOM5: + return loadPlayerRandomFive(g, isAI); + case GAME_TYPE_HORDE: + return loadPlayerHorde(g, isAI); default: return NULL; } @@ -627,6 +787,9 @@ GameType Rules::strToGameMode(string s) if (s.compare("momir") == 0) return GAME_TYPE_MOMIR; if (s.compare("random1") == 0) return GAME_TYPE_RANDOM1; if (s.compare("random2") == 0) return GAME_TYPE_RANDOM2; + if (s.compare("random3") == 0) return GAME_TYPE_RANDOM3; + if (s.compare("random5") == 0) return GAME_TYPE_RANDOM5; + if (s.compare("horde") == 0) return GAME_TYPE_HORDE; if (s.compare("story") == 0) return GAME_TYPE_STORY; if (s.compare("stonehewer") == 0) return GAME_TYPE_STONEHEWER; if (s.compare("hermit") == 0) return GAME_TYPE_HERMIT;