mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Pulled from trunk.
This commit is contained in:
parent
3792ed38e3
commit
82a388175c
946 changed files with 28830 additions and 8311 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -50,7 +50,7 @@ Mage.Updater/target
|
|||
mage.updater.client/target
|
||||
|
||||
releases
|
||||
Utils/author.txt
|
||||
Utils/author.txt
|
||||
.DS_Store
|
||||
.metadata
|
||||
.project
|
||||
|
@ -88,5 +88,6 @@ Mage.Server.Plugins/Mage.Draft.8PlayerBooster/target
|
|||
/Utils/*_unimplemented.txt
|
||||
*.netbeans_automatic_build
|
||||
*.txt
|
||||
Mage.Client/serverlist.txt
|
||||
/bin/
|
||||
Mage.Client/serverlist.txt
|
||||
/bin/
|
||||
/target/
|
|
@ -0,0 +1,454 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.tournament.cubes;
|
||||
|
||||
import mage.game.draft.DraftCube;
|
||||
import mage.game.draft.DraftCube.CardIdentity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class AdamStyborskisPauperCube extends DraftCube {
|
||||
|
||||
public AdamStyborskisPauperCube() {
|
||||
super("Adam Styborkski's Cube (411 cards)"); // https://docs.google.com/spreadsheets/d/12iQhC4bHqFW7hEWxPBjyC8yBDehFZ0_4DkqzyA8EL3o/edit#gid=0
|
||||
|
||||
cubeCards.add(new CardIdentity("Act of Treason", ""));
|
||||
cubeCards.add(new CardIdentity("Adventuring Gear", ""));
|
||||
cubeCards.add(new CardIdentity("Aerie Ouphes", ""));
|
||||
cubeCards.add(new CardIdentity("AEther Adept", ""));
|
||||
cubeCards.add(new CardIdentity("AEthersnipe", ""));
|
||||
cubeCards.add(new CardIdentity("Agony Warp", ""));
|
||||
cubeCards.add(new CardIdentity("Ambush Viper", ""));
|
||||
cubeCards.add(new CardIdentity("Apex Hawks", ""));
|
||||
cubeCards.add(new CardIdentity("Arachnus Web", ""));
|
||||
cubeCards.add(new CardIdentity("Arc Lightning", ""));
|
||||
cubeCards.add(new CardIdentity("Armillary Sphere", ""));
|
||||
cubeCards.add(new CardIdentity("Army of Allah", ""));
|
||||
cubeCards.add(new CardIdentity("Arrest", ""));
|
||||
cubeCards.add(new CardIdentity("Ashes to Ashes", ""));
|
||||
cubeCards.add(new CardIdentity("Assault Zeppelid", ""));
|
||||
cubeCards.add(new CardIdentity("Attended Knight", ""));
|
||||
cubeCards.add(new CardIdentity("Auger Spree", ""));
|
||||
cubeCards.add(new CardIdentity("Aven Riftwatcher", ""));
|
||||
cubeCards.add(new CardIdentity("Aven Surveyor", ""));
|
||||
cubeCards.add(new CardIdentity("Azorius Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Baleful Eidolon", ""));
|
||||
cubeCards.add(new CardIdentity("Barbed Lightning", ""));
|
||||
cubeCards.add(new CardIdentity("Barren Moor", ""));
|
||||
cubeCards.add(new CardIdentity("Basking Rootwalla", ""));
|
||||
cubeCards.add(new CardIdentity("Battle Screech", ""));
|
||||
cubeCards.add(new CardIdentity("Beetleback Chief", ""));
|
||||
cubeCards.add(new CardIdentity("Beetleform Mage", ""));
|
||||
cubeCards.add(new CardIdentity("Blade of the Sixth Pride", ""));
|
||||
cubeCards.add(new CardIdentity("Blastoderm", ""));
|
||||
cubeCards.add(new CardIdentity("Blazing Torch", ""));
|
||||
cubeCards.add(new CardIdentity("Blightning", ""));
|
||||
cubeCards.add(new CardIdentity("Blinding Beam", ""));
|
||||
cubeCards.add(new CardIdentity("Bloodfell Caves", ""));
|
||||
cubeCards.add(new CardIdentity("Blossoming Sands", ""));
|
||||
cubeCards.add(new CardIdentity("Bonded Construct", ""));
|
||||
cubeCards.add(new CardIdentity("Bonds of Faith", ""));
|
||||
cubeCards.add(new CardIdentity("Bonesplitter", ""));
|
||||
cubeCards.add(new CardIdentity("Boomerang", ""));
|
||||
cubeCards.add(new CardIdentity("Borderland Marauder", ""));
|
||||
cubeCards.add(new CardIdentity("Boros Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Branching Bolt", ""));
|
||||
cubeCards.add(new CardIdentity("Brute Force", ""));
|
||||
cubeCards.add(new CardIdentity("Burst Lightning", ""));
|
||||
cubeCards.add(new CardIdentity("Butcher Ghoul", ""));
|
||||
cubeCards.add(new CardIdentity("Cadaver Imp", ""));
|
||||
cubeCards.add(new CardIdentity("Cage of Hands", ""));
|
||||
cubeCards.add(new CardIdentity("Calcite Snapper", ""));
|
||||
cubeCards.add(new CardIdentity("Capsize", ""));
|
||||
cubeCards.add(new CardIdentity("Carnivorous Death-Parrot", ""));
|
||||
cubeCards.add(new CardIdentity("Carnophage", ""));
|
||||
cubeCards.add(new CardIdentity("Cathodion", ""));
|
||||
cubeCards.add(new CardIdentity("Cavern Harpy", ""));
|
||||
cubeCards.add(new CardIdentity("Centaur Healer", ""));
|
||||
cubeCards.add(new CardIdentity("Centaur's Herald", ""));
|
||||
cubeCards.add(new CardIdentity("Center Soul", ""));
|
||||
cubeCards.add(new CardIdentity("Chain Lightning", ""));
|
||||
cubeCards.add(new CardIdentity("Chainer's Edict", ""));
|
||||
cubeCards.add(new CardIdentity("Citanul Woodreaders", ""));
|
||||
cubeCards.add(new CardIdentity("Claustrophobia", ""));
|
||||
cubeCards.add(new CardIdentity("Clay Statue", ""));
|
||||
cubeCards.add(new CardIdentity("Cloaked Siren", ""));
|
||||
cubeCards.add(new CardIdentity("Cloud of Faeries", ""));
|
||||
cubeCards.add(new CardIdentity("Cloudshift", ""));
|
||||
cubeCards.add(new CardIdentity("Coalition Honor Guard", ""));
|
||||
cubeCards.add(new CardIdentity("Cogwork Librarian", ""));
|
||||
cubeCards.add(new CardIdentity("Colossal Might", ""));
|
||||
cubeCards.add(new CardIdentity("Compulsive Research", ""));
|
||||
cubeCards.add(new CardIdentity("Consume Strength", ""));
|
||||
cubeCards.add(new CardIdentity("Corrupted Zendikon", ""));
|
||||
cubeCards.add(new CardIdentity("Counterspell", ""));
|
||||
cubeCards.add(new CardIdentity("Crippling Fatigue", ""));
|
||||
cubeCards.add(new CardIdentity("Crocanura", ""));
|
||||
cubeCards.add(new CardIdentity("Crypt Rats", ""));
|
||||
cubeCards.add(new CardIdentity("Crystallization", ""));
|
||||
cubeCards.add(new CardIdentity("Cultivate", ""));
|
||||
cubeCards.add(new CardIdentity("Cunning Strike", ""));
|
||||
cubeCards.add(new CardIdentity("Curse of Chains", ""));
|
||||
cubeCards.add(new CardIdentity("Custodi Squire", ""));
|
||||
cubeCards.add(new CardIdentity("Daring Skyjek", ""));
|
||||
cubeCards.add(new CardIdentity("Daru Lancer", ""));
|
||||
cubeCards.add(new CardIdentity("Dauthi Horror", ""));
|
||||
cubeCards.add(new CardIdentity("Dauthi Marauder", ""));
|
||||
cubeCards.add(new CardIdentity("Dauthi Mercenary", ""));
|
||||
cubeCards.add(new CardIdentity("Dauthi Slayer", ""));
|
||||
cubeCards.add(new CardIdentity("Dead Reveler", ""));
|
||||
cubeCards.add(new CardIdentity("Dead Weight", ""));
|
||||
cubeCards.add(new CardIdentity("Death Denied", ""));
|
||||
cubeCards.add(new CardIdentity("Deep Analysis", ""));
|
||||
cubeCards.add(new CardIdentity("Deprive", ""));
|
||||
cubeCards.add(new CardIdentity("Deputy of Acquittals", ""));
|
||||
cubeCards.add(new CardIdentity("Desert", ""));
|
||||
cubeCards.add(new CardIdentity("Devour Flesh", ""));
|
||||
cubeCards.add(new CardIdentity("Diabolic Edict", ""));
|
||||
cubeCards.add(new CardIdentity("Dimir Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Disfigure", ""));
|
||||
cubeCards.add(new CardIdentity("Dismal Backwater", ""));
|
||||
cubeCards.add(new CardIdentity("Distortion Strike", ""));
|
||||
cubeCards.add(new CardIdentity("Doom Blade", ""));
|
||||
cubeCards.add(new CardIdentity("Doomed Traveler", ""));
|
||||
cubeCards.add(new CardIdentity("Dragon Fodder", ""));
|
||||
cubeCards.add(new CardIdentity("Driver of the Dead", ""));
|
||||
cubeCards.add(new CardIdentity("Dynacharge", ""));
|
||||
cubeCards.add(new CardIdentity("Elephant Ambush", ""));
|
||||
cubeCards.add(new CardIdentity("Elephant Guide", ""));
|
||||
cubeCards.add(new CardIdentity("Elusive Spellfist", ""));
|
||||
cubeCards.add(new CardIdentity("Enhanced Awareness", ""));
|
||||
cubeCards.add(new CardIdentity("Epic Confrontation", ""));
|
||||
cubeCards.add(new CardIdentity("Errant Ephemeron", ""));
|
||||
cubeCards.add(new CardIdentity("Esper Cormorants", ""));
|
||||
cubeCards.add(new CardIdentity("Essence Scatter", ""));
|
||||
cubeCards.add(new CardIdentity("Ethereal Armor", ""));
|
||||
cubeCards.add(new CardIdentity("Evincar's Justice", ""));
|
||||
cubeCards.add(new CardIdentity("Evolution Charm", ""));
|
||||
cubeCards.add(new CardIdentity("Evolving Wilds", ""));
|
||||
cubeCards.add(new CardIdentity("Exclude", ""));
|
||||
cubeCards.add(new CardIdentity("Eye of Nowhere", ""));
|
||||
cubeCards.add(new CardIdentity("Faceless Butcher", ""));
|
||||
cubeCards.add(new CardIdentity("Faith's Fetters", ""));
|
||||
cubeCards.add(new CardIdentity("Fall of the Hammer", ""));
|
||||
cubeCards.add(new CardIdentity("Farseek", ""));
|
||||
cubeCards.add(new CardIdentity("Feat of Resistance", ""));
|
||||
cubeCards.add(new CardIdentity("Feeling of Dread", ""));
|
||||
cubeCards.add(new CardIdentity("Fellwar Stone", ""));
|
||||
cubeCards.add(new CardIdentity("Fervent Cathar", ""));
|
||||
cubeCards.add(new CardIdentity("Fire Ambush", ""));
|
||||
cubeCards.add(new CardIdentity("Fireblast", ""));
|
||||
cubeCards.add(new CardIdentity("Firebolt", ""));
|
||||
cubeCards.add(new CardIdentity("Firefiend Elemental", ""));
|
||||
cubeCards.add(new CardIdentity("Fireslinger", ""));
|
||||
cubeCards.add(new CardIdentity("Fists of Ironwood", ""));
|
||||
cubeCards.add(new CardIdentity("Flayer Husk", ""));
|
||||
cubeCards.add(new CardIdentity("Flurry of Horns", ""));
|
||||
cubeCards.add(new CardIdentity("Font of Return", ""));
|
||||
cubeCards.add(new CardIdentity("Fortify", ""));
|
||||
cubeCards.add(new CardIdentity("Foul Spirit", ""));
|
||||
cubeCards.add(new CardIdentity("Frilled Oculus", ""));
|
||||
cubeCards.add(new CardIdentity("Frostburn Weird", ""));
|
||||
cubeCards.add(new CardIdentity("Fyndhorn Elves", ""));
|
||||
cubeCards.add(new CardIdentity("Garruk's Companion", ""));
|
||||
cubeCards.add(new CardIdentity("Gathan Raiders", ""));
|
||||
cubeCards.add(new CardIdentity("Gather the Townsfolk", ""));
|
||||
cubeCards.add(new CardIdentity("Ghastly Demise", ""));
|
||||
cubeCards.add(new CardIdentity("Ghirapur Gearcrafter", ""));
|
||||
cubeCards.add(new CardIdentity("Ghitu Slinger", ""));
|
||||
cubeCards.add(new CardIdentity("Giant Growth", ""));
|
||||
cubeCards.add(new CardIdentity("Gideon's Lawkeeper", ""));
|
||||
cubeCards.add(new CardIdentity("Goblin Heelcutter", ""));
|
||||
cubeCards.add(new CardIdentity("Gods Willing", ""));
|
||||
cubeCards.add(new CardIdentity("Goldmeadow Harrier", ""));
|
||||
cubeCards.add(new CardIdentity("Golgari Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Gore-House Chainwalker", ""));
|
||||
cubeCards.add(new CardIdentity("Gravedigger", ""));
|
||||
cubeCards.add(new CardIdentity("Gray Merchant of Asphodel", ""));
|
||||
cubeCards.add(new CardIdentity("Grim Contest", ""));
|
||||
cubeCards.add(new CardIdentity("Grisly Salvage", ""));
|
||||
cubeCards.add(new CardIdentity("Gruul Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Gryff Vanguard", ""));
|
||||
cubeCards.add(new CardIdentity("Guardian Automaton", ""));
|
||||
cubeCards.add(new CardIdentity("Guardian of the Guildpact", ""));
|
||||
cubeCards.add(new CardIdentity("Gurmag Angler", ""));
|
||||
cubeCards.add(new CardIdentity("Halimar Depths", ""));
|
||||
cubeCards.add(new CardIdentity("Halimar Wavewatch", ""));
|
||||
cubeCards.add(new CardIdentity("Harrow", ""));
|
||||
cubeCards.add(new CardIdentity("Harsh Sustenance", ""));
|
||||
cubeCards.add(new CardIdentity("Hissing Iguanar", ""));
|
||||
cubeCards.add(new CardIdentity("Hooting Mandrills", ""));
|
||||
cubeCards.add(new CardIdentity("Hyena Umbra", ""));
|
||||
cubeCards.add(new CardIdentity("Hymn to Tourach", ""));
|
||||
cubeCards.add(new CardIdentity("Imperiosaur", ""));
|
||||
cubeCards.add(new CardIdentity("Incinerate", ""));
|
||||
cubeCards.add(new CardIdentity("Inner-Flame Acolyte", ""));
|
||||
cubeCards.add(new CardIdentity("Into the Roil", ""));
|
||||
cubeCards.add(new CardIdentity("Izzet Chronarch", ""));
|
||||
cubeCards.add(new CardIdentity("Izzet Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Jilt", ""));
|
||||
cubeCards.add(new CardIdentity("Journey to Nowhere", ""));
|
||||
cubeCards.add(new CardIdentity("Jungle Hollow", ""));
|
||||
cubeCards.add(new CardIdentity("Kabuto Moth", ""));
|
||||
cubeCards.add(new CardIdentity("Keldon Marauders", ""));
|
||||
cubeCards.add(new CardIdentity("Khalni Garden", ""));
|
||||
cubeCards.add(new CardIdentity("Kingpin's Pet", ""));
|
||||
cubeCards.add(new CardIdentity("Kodama's Reach", ""));
|
||||
cubeCards.add(new CardIdentity("Kor Skyfisher", ""));
|
||||
cubeCards.add(new CardIdentity("Kozilek's Predator", ""));
|
||||
cubeCards.add(new CardIdentity("Krenko's Command", ""));
|
||||
cubeCards.add(new CardIdentity("Krosan Tusker", ""));
|
||||
cubeCards.add(new CardIdentity("Kruin Striker", ""));
|
||||
cubeCards.add(new CardIdentity("Lash Out", ""));
|
||||
cubeCards.add(new CardIdentity("Last Gasp", ""));
|
||||
cubeCards.add(new CardIdentity("Leonin Bola", ""));
|
||||
cubeCards.add(new CardIdentity("Leonin Scimitar", ""));
|
||||
cubeCards.add(new CardIdentity("Lightning Bolt", ""));
|
||||
cubeCards.add(new CardIdentity("Lightning Strike", ""));
|
||||
cubeCards.add(new CardIdentity("Liliana's Specter", ""));
|
||||
cubeCards.add(new CardIdentity("Llanowar Elves", ""));
|
||||
cubeCards.add(new CardIdentity("Lone Missionary", ""));
|
||||
cubeCards.add(new CardIdentity("Looter il-Kor", ""));
|
||||
cubeCards.add(new CardIdentity("Lotus Path Djinn", ""));
|
||||
cubeCards.add(new CardIdentity("Loyal Cathar", ""));
|
||||
cubeCards.add(new CardIdentity("Loyal Pegasus", ""));
|
||||
cubeCards.add(new CardIdentity("Lurking Automaton", ""));
|
||||
cubeCards.add(new CardIdentity("Makeshift Mauler", ""));
|
||||
cubeCards.add(new CardIdentity("Mana Leak", ""));
|
||||
cubeCards.add(new CardIdentity("Man-o'-War", ""));
|
||||
cubeCards.add(new CardIdentity("Mardu Hordechief", ""));
|
||||
cubeCards.add(new CardIdentity("Mardu Scout", ""));
|
||||
cubeCards.add(new CardIdentity("Mardu Skullhunter", ""));
|
||||
cubeCards.add(new CardIdentity("Martial Glory", ""));
|
||||
cubeCards.add(new CardIdentity("Maul Splicer", ""));
|
||||
cubeCards.add(new CardIdentity("Maze of Ith", ""));
|
||||
cubeCards.add(new CardIdentity("Merfolk Looter", ""));
|
||||
cubeCards.add(new CardIdentity("Mind Stone", ""));
|
||||
cubeCards.add(new CardIdentity("Minotaur Skullcleaver", ""));
|
||||
cubeCards.add(new CardIdentity("Mire Boa", ""));
|
||||
cubeCards.add(new CardIdentity("Miscalculation", ""));
|
||||
cubeCards.add(new CardIdentity("Mishra's Factory", ""));
|
||||
cubeCards.add(new CardIdentity("Mist Raven", ""));
|
||||
cubeCards.add(new CardIdentity("Mogg Fanatic", ""));
|
||||
cubeCards.add(new CardIdentity("Mogg Flunkies", ""));
|
||||
cubeCards.add(new CardIdentity("Mogg War Marshal", ""));
|
||||
cubeCards.add(new CardIdentity("Moldervine Cloak", ""));
|
||||
cubeCards.add(new CardIdentity("Momentary Blink", ""));
|
||||
cubeCards.add(new CardIdentity("Morgue Theft", ""));
|
||||
cubeCards.add(new CardIdentity("Mulldrifter", ""));
|
||||
cubeCards.add(new CardIdentity("Nameless Inversion", ""));
|
||||
cubeCards.add(new CardIdentity("Narcolepsy", ""));
|
||||
cubeCards.add(new CardIdentity("Necromancer's Assistant", ""));
|
||||
cubeCards.add(new CardIdentity("Nessian Asp", ""));
|
||||
cubeCards.add(new CardIdentity("Nest Invader", ""));
|
||||
cubeCards.add(new CardIdentity("Nezumi Cutthroat", ""));
|
||||
cubeCards.add(new CardIdentity("Nightscape Familiar", ""));
|
||||
cubeCards.add(new CardIdentity("Ninja of the Deep Hours", ""));
|
||||
cubeCards.add(new CardIdentity("Oblivion Ring", ""));
|
||||
cubeCards.add(new CardIdentity("Okiba-Gang Shinobi", ""));
|
||||
cubeCards.add(new CardIdentity("Omenspeaker", ""));
|
||||
cubeCards.add(new CardIdentity("Orzhov Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Otherworldly Journey", ""));
|
||||
cubeCards.add(new CardIdentity("Pacifism", ""));
|
||||
cubeCards.add(new CardIdentity("Path of Anger's Flame", ""));
|
||||
cubeCards.add(new CardIdentity("Penumbra Spider", ""));
|
||||
cubeCards.add(new CardIdentity("Perilous Myr", ""));
|
||||
cubeCards.add(new CardIdentity("Pestermite", ""));
|
||||
cubeCards.add(new CardIdentity("Pestilence", ""));
|
||||
cubeCards.add(new CardIdentity("Phantom Nomad", ""));
|
||||
cubeCards.add(new CardIdentity("Phantom Tiger", ""));
|
||||
cubeCards.add(new CardIdentity("Pharika's Chosen", ""));
|
||||
cubeCards.add(new CardIdentity("Phyrexian Rager", ""));
|
||||
cubeCards.add(new CardIdentity("Pillory of the Sleepless", ""));
|
||||
cubeCards.add(new CardIdentity("Pit Fight", ""));
|
||||
cubeCards.add(new CardIdentity("Pit Keeper", ""));
|
||||
cubeCards.add(new CardIdentity("Plated Geopede", ""));
|
||||
cubeCards.add(new CardIdentity("Plover Knights", ""));
|
||||
cubeCards.add(new CardIdentity("Porcelain Legionnaire", ""));
|
||||
cubeCards.add(new CardIdentity("Pouncing Kavu", ""));
|
||||
cubeCards.add(new CardIdentity("Predatory Nightstalker", ""));
|
||||
cubeCards.add(new CardIdentity("Preordain", ""));
|
||||
cubeCards.add(new CardIdentity("Prey Upon", ""));
|
||||
cubeCards.add(new CardIdentity("Prismatic Lens", ""));
|
||||
cubeCards.add(new CardIdentity("Prismatic Strands", ""));
|
||||
cubeCards.add(new CardIdentity("Pristine Talisman", ""));
|
||||
cubeCards.add(new CardIdentity("Probe", ""));
|
||||
cubeCards.add(new CardIdentity("Prophetic Prism", ""));
|
||||
cubeCards.add(new CardIdentity("Putrid Leech", ""));
|
||||
cubeCards.add(new CardIdentity("Pyrotechnics", ""));
|
||||
cubeCards.add(new CardIdentity("Qasali Pridemage", ""));
|
||||
cubeCards.add(new CardIdentity("Raise the Alarm", ""));
|
||||
cubeCards.add(new CardIdentity("Rakdos Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Rakdos Shred-Freak", ""));
|
||||
cubeCards.add(new CardIdentity("Rampant Growth", ""));
|
||||
cubeCards.add(new CardIdentity("Rancor", ""));
|
||||
cubeCards.add(new CardIdentity("Ranger's Guile", ""));
|
||||
cubeCards.add(new CardIdentity("Ray of Command", ""));
|
||||
cubeCards.add(new CardIdentity("Razorfin Hunter", ""));
|
||||
cubeCards.add(new CardIdentity("Reckless Charge", ""));
|
||||
cubeCards.add(new CardIdentity("Reclaim", ""));
|
||||
cubeCards.add(new CardIdentity("Recoil", ""));
|
||||
cubeCards.add(new CardIdentity("Remove Soul", ""));
|
||||
cubeCards.add(new CardIdentity("Rend Flesh", ""));
|
||||
cubeCards.add(new CardIdentity("Rendclaw Trow", ""));
|
||||
cubeCards.add(new CardIdentity("Rhox Maulers", ""));
|
||||
cubeCards.add(new CardIdentity("Rishadan Airship", ""));
|
||||
cubeCards.add(new CardIdentity("River Boa", ""));
|
||||
cubeCards.add(new CardIdentity("Ronin Houndmaster", ""));
|
||||
cubeCards.add(new CardIdentity("Rugged Highlands", ""));
|
||||
cubeCards.add(new CardIdentity("Runed Servitor", ""));
|
||||
cubeCards.add(new CardIdentity("Rushing River", ""));
|
||||
cubeCards.add(new CardIdentity("Safehold Elite", ""));
|
||||
cubeCards.add(new CardIdentity("Sakura-Tribe Elder", ""));
|
||||
cubeCards.add(new CardIdentity("Sandsteppe Outcast", ""));
|
||||
cubeCards.add(new CardIdentity("Sangrite Backlash", ""));
|
||||
cubeCards.add(new CardIdentity("Sarkhan's Rage", ""));
|
||||
cubeCards.add(new CardIdentity("Savage Punch", ""));
|
||||
cubeCards.add(new CardIdentity("Savage Surge", ""));
|
||||
cubeCards.add(new CardIdentity("Scatter the Seeds", ""));
|
||||
cubeCards.add(new CardIdentity("Scion of the Wild", ""));
|
||||
cubeCards.add(new CardIdentity("Scoured Barrens", ""));
|
||||
cubeCards.add(new CardIdentity("Scuzzback Marauders", ""));
|
||||
cubeCards.add(new CardIdentity("Searing Blaze", ""));
|
||||
cubeCards.add(new CardIdentity("Searing Spear", ""));
|
||||
cubeCards.add(new CardIdentity("Sejiri Steppe", ""));
|
||||
cubeCards.add(new CardIdentity("Selesnya Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Sentinel Spider", ""));
|
||||
cubeCards.add(new CardIdentity("Seraph of Dawn", ""));
|
||||
cubeCards.add(new CardIdentity("Serrated Arrows", ""));
|
||||
cubeCards.add(new CardIdentity("Shaper Parasite", ""));
|
||||
cubeCards.add(new CardIdentity("Shelter", ""));
|
||||
cubeCards.add(new CardIdentity("Shimmering Glasskite", ""));
|
||||
cubeCards.add(new CardIdentity("Shimmering Grotto", ""));
|
||||
cubeCards.add(new CardIdentity("Sigil Blessing", ""));
|
||||
cubeCards.add(new CardIdentity("Silent Departure", ""));
|
||||
cubeCards.add(new CardIdentity("Simic Guildgate", ""));
|
||||
cubeCards.add(new CardIdentity("Skinthinner", ""));
|
||||
cubeCards.add(new CardIdentity("Skirk Marauder", ""));
|
||||
cubeCards.add(new CardIdentity("Skyknight Legionnaire", ""));
|
||||
cubeCards.add(new CardIdentity("Skywinder Drake", ""));
|
||||
cubeCards.add(new CardIdentity("Slash Panther", ""));
|
||||
cubeCards.add(new CardIdentity("Slippery Bogle", ""));
|
||||
cubeCards.add(new CardIdentity("Snakeform", ""));
|
||||
cubeCards.add(new CardIdentity("Snap", ""));
|
||||
cubeCards.add(new CardIdentity("Snuff Out", ""));
|
||||
cubeCards.add(new CardIdentity("Soltari Emissary", ""));
|
||||
cubeCards.add(new CardIdentity("Soltari Lancer", ""));
|
||||
cubeCards.add(new CardIdentity("Soltari Trooper", ""));
|
||||
cubeCards.add(new CardIdentity("Soul Manipulation", ""));
|
||||
cubeCards.add(new CardIdentity("Sparksmith", ""));
|
||||
cubeCards.add(new CardIdentity("Sphere of the Suns", ""));
|
||||
cubeCards.add(new CardIdentity("Spined Thopter", ""));
|
||||
cubeCards.add(new CardIdentity("Splatter Thug", ""));
|
||||
cubeCards.add(new CardIdentity("Staggershock", ""));
|
||||
cubeCards.add(new CardIdentity("Stampeding Elk Herd", ""));
|
||||
cubeCards.add(new CardIdentity("Stave Off", ""));
|
||||
cubeCards.add(new CardIdentity("Stealer of Secrets", ""));
|
||||
cubeCards.add(new CardIdentity("Stitched Drake", ""));
|
||||
cubeCards.add(new CardIdentity("Stormfront Pegasus", ""));
|
||||
cubeCards.add(new CardIdentity("Stormscape Apprentice", ""));
|
||||
cubeCards.add(new CardIdentity("Strider Harness", ""));
|
||||
cubeCards.add(new CardIdentity("Strip Mine", ""));
|
||||
cubeCards.add(new CardIdentity("Sultai Scavenger", ""));
|
||||
cubeCards.add(new CardIdentity("Suppression Bonds", ""));
|
||||
cubeCards.add(new CardIdentity("Suq'Ata Lancer", ""));
|
||||
cubeCards.add(new CardIdentity("Swiftwater Cliffs", ""));
|
||||
cubeCards.add(new CardIdentity("Sylvok Lifestaff", ""));
|
||||
cubeCards.add(new CardIdentity("Tail Slash", ""));
|
||||
cubeCards.add(new CardIdentity("Teetering Peaks", ""));
|
||||
cubeCards.add(new CardIdentity("Temporal Isolation", ""));
|
||||
cubeCards.add(new CardIdentity("Tenement Crasher", ""));
|
||||
cubeCards.add(new CardIdentity("Terminate", ""));
|
||||
cubeCards.add(new CardIdentity("Terramorphic Expanse", ""));
|
||||
cubeCards.add(new CardIdentity("Test of Faith", ""));
|
||||
cubeCards.add(new CardIdentity("Thornweald Archer", ""));
|
||||
cubeCards.add(new CardIdentity("Thornwood Falls", ""));
|
||||
cubeCards.add(new CardIdentity("Thought Courier", ""));
|
||||
cubeCards.add(new CardIdentity("Thundering Giant", ""));
|
||||
cubeCards.add(new CardIdentity("Thundering Tanadon", ""));
|
||||
cubeCards.add(new CardIdentity("Time to Feed", ""));
|
||||
cubeCards.add(new CardIdentity("Tithe Drinker", ""));
|
||||
cubeCards.add(new CardIdentity("Totem-Guide Hartebeest", ""));
|
||||
cubeCards.add(new CardIdentity("Tragic Slip", ""));
|
||||
cubeCards.add(new CardIdentity("Tranquil Cove", ""));
|
||||
cubeCards.add(new CardIdentity("Travel Preparations", ""));
|
||||
cubeCards.add(new CardIdentity("Treasure Cruise", ""));
|
||||
cubeCards.add(new CardIdentity("Triplicate Spirits", ""));
|
||||
cubeCards.add(new CardIdentity("Trumpet Blast", ""));
|
||||
cubeCards.add(new CardIdentity("Tumble Magnet", ""));
|
||||
cubeCards.add(new CardIdentity("Twin Bolt", ""));
|
||||
cubeCards.add(new CardIdentity("Typhoid Rats", ""));
|
||||
cubeCards.add(new CardIdentity("Ulamog's Crusher", ""));
|
||||
cubeCards.add(new CardIdentity("Undying Evil", ""));
|
||||
cubeCards.add(new CardIdentity("Unearth", ""));
|
||||
cubeCards.add(new CardIdentity("Unknown Shores", ""));
|
||||
cubeCards.add(new CardIdentity("Unmake", ""));
|
||||
cubeCards.add(new CardIdentity("Vampire Interloper", ""));
|
||||
cubeCards.add(new CardIdentity("Vampire Lacerator", ""));
|
||||
cubeCards.add(new CardIdentity("Vault Skirge", ""));
|
||||
cubeCards.add(new CardIdentity("Vendetta", ""));
|
||||
cubeCards.add(new CardIdentity("Veteran's Sidearm", ""));
|
||||
cubeCards.add(new CardIdentity("Viashino Firstblade", ""));
|
||||
cubeCards.add(new CardIdentity("Vines of Vastwood", ""));
|
||||
cubeCards.add(new CardIdentity("Voidwielder", ""));
|
||||
cubeCards.add(new CardIdentity("Volcanic Hammer", ""));
|
||||
cubeCards.add(new CardIdentity("Vulshok Morningstar", ""));
|
||||
cubeCards.add(new CardIdentity("Vulshok Sorcerer", ""));
|
||||
cubeCards.add(new CardIdentity("Vulturous Aven", ""));
|
||||
cubeCards.add(new CardIdentity("Wakedancer", ""));
|
||||
cubeCards.add(new CardIdentity("Walker of the Grove", ""));
|
||||
cubeCards.add(new CardIdentity("Wall of Roots", ""));
|
||||
cubeCards.add(new CardIdentity("War Flare", ""));
|
||||
cubeCards.add(new CardIdentity("Warren Pilferers", ""));
|
||||
cubeCards.add(new CardIdentity("Waterfront Bouncer", ""));
|
||||
cubeCards.add(new CardIdentity("Wayfarer's Bauble", ""));
|
||||
cubeCards.add(new CardIdentity("Whirlpool Whelm", ""));
|
||||
cubeCards.add(new CardIdentity("Whispers of the Muse", ""));
|
||||
cubeCards.add(new CardIdentity("Whispersilk Cloak", ""));
|
||||
cubeCards.add(new CardIdentity("Whitemane Lion", ""));
|
||||
cubeCards.add(new CardIdentity("Wickerbough Elder", ""));
|
||||
cubeCards.add(new CardIdentity("Wild Instincts", ""));
|
||||
cubeCards.add(new CardIdentity("Wild Mongrel", ""));
|
||||
cubeCards.add(new CardIdentity("Wild Nacatl", ""));
|
||||
cubeCards.add(new CardIdentity("Wildsize", ""));
|
||||
cubeCards.add(new CardIdentity("Will-Forged Golem", ""));
|
||||
cubeCards.add(new CardIdentity("Wind-Scarred Crag", ""));
|
||||
cubeCards.add(new CardIdentity("Wingcrafter", ""));
|
||||
cubeCards.add(new CardIdentity("Wingsteed Rider", ""));
|
||||
cubeCards.add(new CardIdentity("Withdraw", ""));
|
||||
cubeCards.add(new CardIdentity("Wojek Halberdiers", ""));
|
||||
cubeCards.add(new CardIdentity("Wrecking Ball", ""));
|
||||
cubeCards.add(new CardIdentity("Yavimaya Elder", ""));
|
||||
cubeCards.add(new CardIdentity("Yotian Soldier", ""));
|
||||
cubeCards.add(new CardIdentity("Young Wolf", ""));
|
||||
cubeCards.add(new CardIdentity("Youthful Knight", ""));
|
||||
cubeCards.add(new CardIdentity("Zhur-Taa Swine", ""));
|
||||
}
|
||||
}
|
|
@ -65,6 +65,7 @@
|
|||
<tournamentType name="Sealed Swiss (Cube)" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedSwissTournament" typeName="mage.tournament.SealedSwissCubeTournamentType"/>
|
||||
</tournamentTypes>
|
||||
<draftCubes>
|
||||
<draftCube name="Adam Styborski's Pauper Cube (411 cards)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.AdamStyborskisPauperCube"/>
|
||||
<draftCube name="Ben's Cube (720 cards)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.BensCube"/>
|
||||
<draftCube name="Cube Tutor 360 Pauper" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeTutor360Pauper"/>
|
||||
<draftCube name="Cube Tutor 720" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeTutor720"/>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
<tournamentType name="Sealed Swiss (Cube)" jar="mage-tournament-sealed-${project.version}.jar" className="mage.tournament.SealedSwissTournament" typeName="mage.tournament.SealedSwissCubeTournamentType"/>
|
||||
</tournamentTypes>
|
||||
<draftCubes>
|
||||
<draftCube name="Adam Styborski's Pauper Cube (411 cards)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.AdamStyborskisPauperCube"/>
|
||||
<draftCube name="Ben's Cube (720 cards)" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.BensCube"/>
|
||||
<draftCube name="Cube Tutor 360 Pauper" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.CubeTutor360Pauper"/>
|
||||
<draftCube name="Cube Tutor 720" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.CubeTutor720"/>
|
||||
|
|
|
@ -825,8 +825,11 @@ public class GameController implements GameCallback {
|
|||
@Override
|
||||
public void execute(UUID playerId) {
|
||||
if (cards != null) {
|
||||
Zone targetZone = (Zone) options.get("targetZone");
|
||||
boolean showFaceDown = targetZone != null && targetZone.equals(Zone.PICK);
|
||||
// Zone targetZone = (Zone) options.get("targetZone");
|
||||
// Are there really situations where a player selects from a list of face down cards?
|
||||
// So always show face up for selection
|
||||
// boolean showFaceDown = targetZone != null && targetZone.equals(Zone.PICK);
|
||||
boolean showFaceDown = true;
|
||||
getGameSession(playerId).target(question, new CardsView(game, cards.getCards(game), showFaceDown), targets, required, options);
|
||||
} else if (perms != null) {
|
||||
CardsView permsView = new CardsView();
|
||||
|
|
|
@ -228,13 +228,15 @@ class TableListSorter implements Comparator<Table> {
|
|||
|
||||
@Override
|
||||
public int compare(Table one, Table two) {
|
||||
if (!one.getState().equals(TableState.SIDEBOARDING) && !one.getState().equals(TableState.DUELING)) {
|
||||
if (one.getState().compareTo(two.getState()) != 0) {
|
||||
return one.getState().compareTo(two.getState());
|
||||
}
|
||||
} else if (!two.getState().equals(TableState.SIDEBOARDING) && !two.getState().equals(TableState.DUELING)) {
|
||||
if (one.getState().compareTo(two.getState()) != 0) {
|
||||
return one.getState().compareTo(two.getState());
|
||||
if (one.getState() != null && two.getState() != null) {
|
||||
if (!TableState.SIDEBOARDING.equals(one.getState()) && !TableState.DUELING.equals(one.getState())) {
|
||||
if (one.getState().compareTo(two.getState()) != 0) {
|
||||
return one.getState().compareTo(two.getState());
|
||||
}
|
||||
} else if (!TableState.SIDEBOARDING.equals(two.getState()) && !TableState.DUELING.equals(two.getState())) {
|
||||
if (one.getState().compareTo(two.getState()) != 0) {
|
||||
return one.getState().compareTo(two.getState());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (two.getEndTime() != null) {
|
||||
|
|
52
Mage.Sets/src/mage/sets/Commander2015.java
Normal file
52
Mage.Sets/src/mage/sets/Commander2015.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
|
||||
public class Commander2015 extends ExpansionSet {
|
||||
|
||||
private static final Commander2015 fINSTANCE = new Commander2015();
|
||||
|
||||
public static Commander2015 getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private Commander2015() {
|
||||
super("Commander 2015 Edition", "C15", "mage.sets.commander2015", new GregorianCalendar(2015, 11, 13).getTime(), SetType.SUPPLEMENTAL);
|
||||
this.blockName = "Command Zone";
|
||||
}
|
||||
|
||||
}
|
|
@ -41,7 +41,6 @@ import mage.constants.Rarity;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
import mage.filter.predicate.mageobject.AnotherCardPredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -62,7 +61,8 @@ public class ArsenalThresher extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// As Arsenal Thresher enters the battlefield, you may reveal any number of other artifact cards from your hand. Arsenal Thresher enters the battlefield with a +1/+1 counter on it for each card revealed this way.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ArsenalThresherEffect(), "you may reveal any number of other artifact cards from your hand. {this} enters the battlefield with a +1/+1 counter on it for each card revealed this way"));
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ArsenalThresherEffect(),
|
||||
"you may reveal any number of other artifact cards from your hand. {this} enters the battlefield with a +1/+1 counter on it for each card revealed this way"));
|
||||
}
|
||||
|
||||
public ArsenalThresher(final ArsenalThresher card) {
|
||||
|
@ -92,29 +92,29 @@ class ArsenalThresherEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (you == null) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Permanent arsenalThresher = game.getPermanent(source.getSourceId());
|
||||
Permanent arsenalThresher = game.getPermanentEntering(source.getSourceId());
|
||||
FilterArtifactCard filter = new FilterArtifactCard();
|
||||
filter.add(new AnotherCardPredicate());
|
||||
if (you.chooseUse(Outcome.Benefit, "Do you want to reveal other artifacts in your hand?", source, game)) {
|
||||
if (controller.chooseUse(Outcome.Benefit, "Do you want to reveal other artifacts in your hand?", source, game)) {
|
||||
Cards cards = new CardsImpl();
|
||||
if (you.getHand().count(filter, source.getSourceId(), source.getControllerId(), game) > 0) {
|
||||
if (controller.getHand().count(filter, source.getSourceId(), source.getControllerId(), game) > 0) {
|
||||
TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter);
|
||||
if (you.choose(Outcome.Benefit, target, source.getSourceId(), game)) {
|
||||
if (controller.choose(Outcome.Benefit, target, source.getSourceId(), game)) {
|
||||
for (UUID uuid : target.getTargets()) {
|
||||
cards.add(you.getHand().get(uuid, game));
|
||||
cards.add(controller.getHand().get(uuid, game));
|
||||
}
|
||||
you.revealCards("Revealed cards", cards, game);
|
||||
if (arsenalThresher != null) {
|
||||
controller.revealCards(arsenalThresher.getIdName(), cards, game);
|
||||
arsenalThresher.addCounters(CounterType.P1P1.createInstance(cards.size()), game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class MayaelsAriaEffect extends OneShotEffect {
|
|||
// put a +1/+1 counter on each creature you control if you control a creature with power 5 or greater.
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
|
||||
if (game.getState().getBattlefield().countAll(filter, id, game) > 0) {
|
||||
if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) {
|
||||
for (Permanent creature : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||
creature.addCounters(CounterType.P1P1.createInstance(), game);
|
||||
}
|
||||
|
@ -106,14 +106,14 @@ class MayaelsAriaEffect extends OneShotEffect {
|
|||
// Then you gain 10 life if you control a creature with power 10 or greater.
|
||||
filter = new FilterCreaturePermanent();
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 9));
|
||||
if (game.getState().getBattlefield().countAll(filter, id, game) > 0) {
|
||||
if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) {
|
||||
controller.gainLife(10, game);
|
||||
}
|
||||
|
||||
// Then you win the game if you control a creature with power 20 or greater.
|
||||
filter = new FilterCreaturePermanent();
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 19));
|
||||
if (game.getState().getBattlefield().countAll(filter, id, game) > 0) {
|
||||
if (game.getState().getBattlefield().countAll(filter, controller.getId(), game) > 0) {
|
||||
controller.won(game);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -60,9 +60,6 @@ public class Thraximundar extends CardImpl {
|
|||
this.subtype.add("Zombie");
|
||||
this.subtype.add("Assassin");
|
||||
|
||||
|
||||
|
||||
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
|
@ -116,7 +113,8 @@ class ThraximundarTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getSourceId() == this.getSourceId()) {
|
||||
if (event.getSourceId() != null
|
||||
&& event.getSourceId().equals(this.getSourceId())) {
|
||||
UUID defender = game.getCombat().getDefendingPlayerId(this.getSourceId(), game);
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(defender));
|
||||
return true;
|
||||
|
@ -160,4 +158,4 @@ class PlayerSacrificesCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public PlayerSacrificesCreatureTriggeredAbility copy() {
|
||||
return new PlayerSacrificesCreatureTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,14 +28,13 @@
|
|||
package mage.sets.alarareborn;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
|
@ -54,10 +53,6 @@ public class Wargate extends CardImpl {
|
|||
super(ownerId, 129, "Wargate", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{G}{W}{U}");
|
||||
this.expansionSetCode = "ARB";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Search your library for a permanent card with converted mana cost X or less, put it onto the battlefield, then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new WargateEffect());
|
||||
}
|
||||
|
@ -72,8 +67,8 @@ public class Wargate extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class WargateEffect extends OneShotEffect {
|
||||
|
||||
WargateEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
staticText = "Search your library for a permanent card with converted mana cost X or less, put it onto the battlefield, then shuffle your library";
|
||||
|
@ -97,7 +92,7 @@ class WargateEffect extends OneShotEffect {
|
|||
if (target.getTargets().size() > 0) {
|
||||
Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
84
Mage.Sets/src/mage/sets/alliances/JuniperOrderAdvocate.java
Normal file
84
Mage.Sets/src/mage/sets/alliances/JuniperOrderAdvocate.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.alliances;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.SourceTappedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class JuniperOrderAdvocate extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("green creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public JuniperOrderAdvocate(UUID ownerId) {
|
||||
super(ownerId, 132, "Juniper Order Advocate", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.expansionSetCode = "ALL";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Knight");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// As long as Juniper Order Advocate is untapped, green creatures you control get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false),
|
||||
new InvertCondition(new SourceTappedCondition()),
|
||||
"As long as {this} is untapped, green creatures you control get +1/+1.")));
|
||||
}
|
||||
|
||||
public JuniperOrderAdvocate(final JuniperOrderAdvocate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JuniperOrderAdvocate copy() {
|
||||
return new JuniperOrderAdvocate(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/alliances/ThoughtLash.java
Normal file
52
Mage.Sets/src/mage/sets/alliances/ThoughtLash.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.alliances;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class ThoughtLash extends mage.sets.masterseditionii.ThoughtLash {
|
||||
|
||||
public ThoughtLash(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 58;
|
||||
this.expansionSetCode = "ALL";
|
||||
}
|
||||
|
||||
public ThoughtLash(final ThoughtLash card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThoughtLash copy() {
|
||||
return new ThoughtLash(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.anthologyjacevschandra;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class Hostility extends mage.sets.jacevschandra.Hostility {
|
||||
|
||||
public Hostility(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 48;
|
||||
this.expansionSetCode = "DD3D";
|
||||
}
|
||||
|
||||
public Hostility(final Hostility card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Hostility copy() {
|
||||
return new Hostility(this);
|
||||
}
|
||||
}
|
|
@ -38,7 +38,7 @@ public class Ophidian extends mage.sets.vintagemasters.Ophidian {
|
|||
public Ophidian(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 9;
|
||||
this.expansionSetCode = "DD3";
|
||||
this.expansionSetCode = "DD3D";
|
||||
}
|
||||
|
||||
public Ophidian(final Ophidian card) {
|
||||
|
|
142
Mage.Sets/src/mage/sets/antiquities/DrafnasRestoration.java
Normal file
142
Mage.Sets/src/mage/sets/antiquities/DrafnasRestoration.java
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.antiquities;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class DrafnasRestoration extends CardImpl {
|
||||
|
||||
public DrafnasRestoration(UUID ownerId) {
|
||||
super(ownerId, 52, "Drafna's Restoration", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{U}");
|
||||
this.expansionSetCode = "ATQ";
|
||||
|
||||
// Return any number of target artifact cards from target player's graveyard to the top of his or her library in any order.
|
||||
this.getSpellAbility().addEffect(new DrafnasRestorationEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addTarget(new DrafnasRestorationTarget());
|
||||
}
|
||||
|
||||
public DrafnasRestoration(final DrafnasRestoration card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrafnasRestoration copy() {
|
||||
return new DrafnasRestoration(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DrafnasRestorationTarget extends TargetCardInGraveyard {
|
||||
|
||||
DrafnasRestorationTarget() {
|
||||
super(0, Integer.MAX_VALUE, new FilterArtifactCard("any number of artifact cards from that player's graveyard"));
|
||||
}
|
||||
|
||||
DrafnasRestorationTarget(final DrafnasRestorationTarget target) {
|
||||
super(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTarget(UUID id, Ability source, Game game) {
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
return targetPlayer != null && targetPlayer.getGraveyard().contains(id) && super.canTarget(id, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) {
|
||||
Set<UUID> possibleTargets = new HashSet<>();
|
||||
MageObject object = game.getObject(sourceId);
|
||||
if (object != null && object instanceof StackObject) {
|
||||
Player targetPlayer = game.getPlayer(((StackObject) object).getStackAbility().getFirstTarget());
|
||||
if (targetPlayer != null) {
|
||||
for (Card card : targetPlayer.getGraveyard().getCards(filter, sourceId, sourceControllerId, game)) {
|
||||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.TARGET, card.getId(), sourceId, sourceControllerId))) {
|
||||
possibleTargets.add(card.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return possibleTargets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrafnasRestorationTarget copy() {
|
||||
return new DrafnasRestorationTarget(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DrafnasRestorationEffect extends OneShotEffect {
|
||||
|
||||
DrafnasRestorationEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Return any number of target artifact cards from target player's graveyard to the top of his or her library in any order";
|
||||
}
|
||||
|
||||
DrafnasRestorationEffect(final DrafnasRestorationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrafnasRestorationEffect copy() {
|
||||
return new DrafnasRestorationEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards cards = new CardsImpl(source.getTargets().get(1).getTargets());
|
||||
controller.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.sets.antiquities;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
@ -43,7 +42,6 @@ import mage.filter.common.FilterControlledArtifactPermanent;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -57,7 +55,6 @@ public class TransmuteArtifact extends CardImpl {
|
|||
super(ownerId, 58, "Transmute Artifact", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{U}{U}");
|
||||
this.expansionSetCode = "ATQ";
|
||||
|
||||
|
||||
// Sacrifice an artifact. If you do, search your library for an artifact card. If that card's converted mana cost is less than or equal to the sacrificed artifact's converted mana cost, put it onto the battlefield. If it's greater, you may pay {X}, where X is the difference. If you do, put it onto the battlefield. If you don't, put it into its owner's graveyard. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new TransmuteArtifactEffect());
|
||||
}
|
||||
|
@ -74,7 +71,6 @@ public class TransmuteArtifact extends CardImpl {
|
|||
|
||||
class TransmuteArtifactEffect extends SearchEffect {
|
||||
|
||||
|
||||
public TransmuteArtifactEffect() {
|
||||
super(new TargetCardInLibrary(new FilterArtifactCard()), Outcome.PutCardInPlay);
|
||||
staticText = "Sacrifice an artifact. If you do, search your library for an artifact card. If that card's converted mana cost is less than or equal to the sacrificed artifact's converted mana cost, put it onto the battlefield. If it's greater, you may pay {X}, where X is the difference. If you do, put it onto the battlefield. If you don't, put it into its owner's graveyard. Then shuffle your library";
|
||||
|
@ -95,41 +91,36 @@ class TransmuteArtifactEffect extends SearchEffect {
|
|||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
//Sacrifice an artifact.
|
||||
//Sacrifice an artifact.
|
||||
int convertedManaCost = 0;
|
||||
boolean sacrifice = false;
|
||||
TargetControlledPermanent targetArtifact = new TargetControlledPermanent(new FilterControlledArtifactPermanent());
|
||||
if(controller.chooseTarget(Outcome.Sacrifice, targetArtifact, source, game)){
|
||||
if (controller.chooseTarget(Outcome.Sacrifice, targetArtifact, source, game)) {
|
||||
Permanent permanent = game.getPermanent(targetArtifact.getFirstTarget());
|
||||
if(permanent != null){
|
||||
if (permanent != null) {
|
||||
convertedManaCost = permanent.getManaCost().convertedManaCost();
|
||||
sacrifice = permanent.sacrifice(source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
//If you do, search your library for an artifact card.
|
||||
//If you do, search your library for an artifact card.
|
||||
if (sacrifice && controller.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
for (UUID cardId: target.getTargets()) {
|
||||
for (UUID cardId : target.getTargets()) {
|
||||
Card card = controller.getLibrary().getCard(cardId, game);
|
||||
if (card != null) {
|
||||
//If that card's converted mana cost is less than or equal to the sacrificed artifact's converted mana cost, put it onto the battlefield.
|
||||
if(card.getManaCost().convertedManaCost() <= convertedManaCost){
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
}
|
||||
else
|
||||
{
|
||||
//If it's greater, you may pay {X}, where X is the difference. If you do, put it onto the battlefield.
|
||||
//If that card's converted mana cost is less than or equal to the sacrificed artifact's converted mana cost, put it onto the battlefield.
|
||||
if (card.getManaCost().convertedManaCost() <= convertedManaCost) {
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
} else {
|
||||
//If it's greater, you may pay {X}, where X is the difference. If you do, put it onto the battlefield.
|
||||
GenericManaCost cost = new GenericManaCost(card.getManaCost().convertedManaCost() - convertedManaCost);
|
||||
if(cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)){
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
}
|
||||
else{
|
||||
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
} else {
|
||||
//If you don't, put it into its owner's graveyard. Then shuffle your library
|
||||
controller.moveCards(card, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(card, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,5 +133,4 @@ class TransmuteArtifactEffect extends SearchEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -68,14 +68,14 @@ public class Anavolver extends CardImpl {
|
|||
// If Anavolver was kicked with its {1}{U} kicker, it enters the battlefield with two +1/+1 counters on it and with flying.
|
||||
EntersBattlefieldAbility ability1 = new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2),false),
|
||||
new KickedCostCondition("{1}{U}"), true, "If {this} was kicked with its {1}{U} kicker, it enters the battlefield with two +1/+1 counters on it and with flying.",
|
||||
new KickedCostCondition("{1}{U}"), "If {this} was kicked with its {1}{U} kicker, it enters the battlefield with two +1/+1 counters on it and with flying.",
|
||||
"{this} enters the battlefield with two +1/+1 counters on it and with flying");
|
||||
((EntersBattlefieldEffect)ability1.getEffects().get(0)).addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability1);
|
||||
|
||||
// If Anavolver was kicked with its {B} kicker, it enters the battlefield with a +1/+1 counter on it and with "Pay 3 life: Regenerate Anavolver."
|
||||
EntersBattlefieldAbility ability2 = new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1),false), new KickedCostCondition("{B}"), true,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1),false), new KickedCostCondition("{B}"),
|
||||
"If {this} was kicked with its {B} kicker, it enters the battlefield with a +1/+1 counter on it and with \"Pay 3 life: Regenerate Anavolver.\"",
|
||||
"{this} enters the battlefield with a +1/+1 counter on it and with \"Pay 3 life: Regenerate Anavolver.\"");
|
||||
((EntersBattlefieldEffect)ability2.getEffects().get(0)).addEffect(new GainAbilitySourceEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new PayLifeCost(3)), Duration.WhileOnBattlefield));
|
||||
|
|
|
@ -65,14 +65,14 @@ public class Cetavolver extends CardImpl {
|
|||
// If Cetavolver was kicked with its {1}{R} kicker, it enters the battlefield with two +1/+1 counters on it and with first strike.
|
||||
EntersBattlefieldAbility ability1 = new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2),false),
|
||||
new KickedCostCondition("{1}{R}"), true, "If Cetavolver was kicked with its {1}{R} kicker, it enters the battlefield with two +1/+1 counters on it and with first strike.",
|
||||
new KickedCostCondition("{1}{R}"), "If Cetavolver was kicked with its {1}{R} kicker, it enters the battlefield with two +1/+1 counters on it and with first strike.",
|
||||
"{this} enters the battlefield with two +1/+1 counters on it and with first strike");
|
||||
((EntersBattlefieldEffect)ability1.getEffects().get(0)).addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability1);
|
||||
|
||||
// If Cetavolver was kicked with its {G} kicker, it enters the battlefield with a +1/+1 counter on it and with trample.
|
||||
EntersBattlefieldAbility ability2 = new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1),false), new KickedCostCondition("{G}"), true,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1),false), new KickedCostCondition("{G}"),
|
||||
"If Cetavolver was kicked with its {G} kicker, it enters the battlefield with a +1/+1 counter on it and with trample.",
|
||||
"{this} enters the battlefield with a +1/+1 counter on it and with trample");
|
||||
((EntersBattlefieldEffect)ability2.getEffects().get(0)).addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||
|
|
|
@ -69,14 +69,14 @@ public class Degavolver extends CardImpl {
|
|||
// If Degavolver was kicked with its {1}{B} kicker, it enters the battlefield with two +1/+1 counters on it and with "Pay 3 life: Regenerate Degavolver."
|
||||
EntersBattlefieldAbility ability1 = new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2),false),
|
||||
new KickedCostCondition("{1}{B}"), true, "If Degavolver was kicked with its {1}{B} kicker, it enters the battlefield with two +1/+1 counters on it and with \"Pay 3 life: Regenerate Degavolver.\"",
|
||||
new KickedCostCondition("{1}{B}"), "If Degavolver was kicked with its {1}{B} kicker, it enters the battlefield with two +1/+1 counters on it and with \"Pay 3 life: Regenerate Degavolver.\"",
|
||||
"{this} enters the battlefield with two +1/+1 counters on it and with \"Pay 3 life: Regenerate Degavolver.\"");
|
||||
((EntersBattlefieldEffect)ability1.getEffects().get(0)).addEffect(new GainAbilitySourceEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new PayLifeCost(3)), Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability1);
|
||||
|
||||
// If Degavolver was kicked with its {R} kicker, it enters the battlefield with a +1/+1 counter on it and with first strike.
|
||||
EntersBattlefieldAbility ability2 = new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1),false), new KickedCostCondition("{R}"), true,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1),false), new KickedCostCondition("{R}"),
|
||||
"If Degavolver was kicked with its {R} kicker, it enters the battlefield with a +1/+1 counter on it and with first strike.",
|
||||
"{this} enters the battlefield with a +1/+1 counter on it and with first strike");
|
||||
((EntersBattlefieldEffect)ability2.getEffects().get(0)).addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||
|
|
|
@ -25,13 +25,9 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -41,6 +37,9 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -79,6 +78,7 @@ public class DesolationAngel extends CardImpl {
|
|||
}
|
||||
|
||||
class DesolationAngelEntersBattlefieldEffect extends OneShotEffect {
|
||||
|
||||
DesolationAngelEntersBattlefieldEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
staticText = "destroy all lands you control. If it was kicked, destroy all lands instead";
|
||||
|
@ -93,8 +93,8 @@ class DesolationAngelEntersBattlefieldEffect extends OneShotEffect {
|
|||
Card p = game.getCard(source.getSourceId());
|
||||
boolean kicked = KickedCondition.getInstance().apply(game, source);
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
||||
if ((!kicked && permanent.getControllerId() == source.getControllerId())
|
||||
|| kicked) {
|
||||
if ((!kicked && permanent.getControllerId().equals(source.getControllerId()))
|
||||
|| kicked) {
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
|
@ -106,4 +106,4 @@ class DesolationAngelEntersBattlefieldEffect extends OneShotEffect {
|
|||
return new DesolationAngelEntersBattlefieldEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -34,11 +33,11 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureAllEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
|
@ -52,7 +51,6 @@ import mage.target.common.TargetCardInYourGraveyard;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class LifeDeath extends SplitCard {
|
||||
|
||||
public LifeDeath(UUID ownerId) {
|
||||
|
@ -61,8 +59,8 @@ public class LifeDeath extends SplitCard {
|
|||
|
||||
// Life
|
||||
// All lands you control become 1/1 creatures until end of turn. They're still lands.
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new BecomesCreatureAllEffect(new LifeLandToken(), "lands",
|
||||
new FilterControlledLandPermanent("lands you control"), Duration.EndOfTurn));
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new BecomesCreatureAllEffect(new LifeLandToken(), "lands",
|
||||
new FilterControlledLandPermanent("lands you control"), Duration.EndOfTurn));
|
||||
|
||||
// Death
|
||||
// Return target creature card from your graveyard to the battlefield. You lose life equal to its converted mana cost.
|
||||
|
@ -83,6 +81,7 @@ public class LifeDeath extends SplitCard {
|
|||
}
|
||||
|
||||
class LifeLandToken extends Token {
|
||||
|
||||
public LifeLandToken() {
|
||||
super("", "1/1 creatures");
|
||||
cardType.add(CardType.CREATURE);
|
||||
|
@ -115,10 +114,10 @@ class DeathEffect extends OneShotEffect {
|
|||
if (creatureCard != null && controller != null) {
|
||||
boolean result = false;
|
||||
if (game.getState().getZone(creatureCard.getId()).equals(Zone.GRAVEYARD)) {
|
||||
result = controller.putOntoBattlefieldWithInfo(creatureCard, game, Zone.GRAVEYARD, source.getSourceId());
|
||||
}
|
||||
controller.moveCards(creatureCard, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
controller.loseLife(creatureCard.getManaCost().convertedManaCost(), game);
|
||||
return result;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -64,12 +64,12 @@ public class Necravolver extends CardImpl {
|
|||
this.addAbility(kickerAbility);
|
||||
// If Necravolver was kicked with its {1}{G} kicker, it enters the battlefield with two +1/+1 counters on it and with trample.
|
||||
Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),
|
||||
new KickedCostCondition("{1}{G}"), true, "If {this} was kicked with its {1}{G} kicker, it enters the battlefield with two +1/+1 counters on it and with trample.", "");
|
||||
new KickedCostCondition("{1}{G}"), "If {this} was kicked with its {1}{G} kicker, it enters the battlefield with two +1/+1 counters on it and with trample.", "");
|
||||
ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability);
|
||||
// If Necravolver was kicked with its {W} kicker, it enters the battlefield with a +1/+1 counter on it and with "Whenever Necravolver deals damage, you gain that much life."
|
||||
ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)),
|
||||
new KickedCostCondition("{W}"), true, "If {this} was kicked with its {W} kicker, it enters the battlefield with a +1/+1 counter on it and with \"Whenever {this} deals damage, you gain that much life.\"", "");
|
||||
new KickedCostCondition("{W}"), "If {this} was kicked with its {W} kicker, it enters the battlefield with a +1/+1 counter on it and with \"Whenever {this} deals damage, you gain that much life.\"", "");
|
||||
ability.addEffect(new GainAbilitySourceEffect(new DealsDamageGainLifeSourceTriggeredAbility(), Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -64,12 +64,12 @@ public class Rakavolver extends CardImpl {
|
|||
this.addAbility(kickerAbility);
|
||||
// If Rakavolver was kicked with its {1}{W} kicker, it enters the battlefield with two +1/+1 counters on it and with "Whenever Rakavolver deals damage, you gain that much life."
|
||||
Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),
|
||||
new KickedCostCondition("{1}{W}"), true, "If {this} was kicked with its {1}{W} kicker, it enters the battlefield with two +1/+1 counters on it and with \"Whenever {this} deals damage, you gain that much life.\"", "");
|
||||
new KickedCostCondition("{1}{W}"), "If {this} was kicked with its {1}{W} kicker, it enters the battlefield with two +1/+1 counters on it and with \"Whenever {this} deals damage, you gain that much life.\"", "");
|
||||
ability.addEffect(new GainAbilitySourceEffect(new DealsDamageGainLifeSourceTriggeredAbility(), Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability);
|
||||
// If Rakavolver was kicked with its {U} kicker, it enters the battlefield with a +1/+1 counter on it and with flying.
|
||||
ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)),
|
||||
new KickedCostCondition("{U}"), true, "If {this} was kicked with its {U} kicker, it enters the battlefield with a +1/+1 counter on it and with flying.", "");
|
||||
new KickedCostCondition("{U}"), "If {this} was kicked with its {U} kicker, it enters the battlefield with a +1/+1 counter on it and with flying.", "");
|
||||
ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
62
Mage.Sets/src/mage/sets/arabiannights/ArmyOfAllah.java
Normal file
62
Mage.Sets/src/mage/sets/arabiannights/ArmyOfAllah.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.arabiannights;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class ArmyOfAllah extends CardImpl {
|
||||
|
||||
private static final FilterAttackingCreature filter = new FilterAttackingCreature("Attacking creatures");
|
||||
|
||||
public ArmyOfAllah(UUID ownerId) {
|
||||
super(ownerId, 56, "Army of Allah", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}{W}");
|
||||
this.expansionSetCode = "ARN";
|
||||
|
||||
// Attacking creatures get +2/+0 until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false));
|
||||
}
|
||||
|
||||
public ArmyOfAllah(final ArmyOfAllah card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmyOfAllah copy() {
|
||||
return new ArmyOfAllah(this);
|
||||
}
|
||||
}
|
54
Mage.Sets/src/mage/sets/arabiannights/KhabalGhoul.java
Normal file
54
Mage.Sets/src/mage/sets/arabiannights/KhabalGhoul.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.arabiannights;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class KhabalGhoul extends mage.sets.mastersedition.KhabalGhoul {
|
||||
|
||||
public KhabalGhoul(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 10;
|
||||
this.expansionSetCode = "ARN";
|
||||
this.rarity = Rarity.UNCOMMON;
|
||||
}
|
||||
|
||||
public KhabalGhoul(final KhabalGhoul card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KhabalGhoul copy() {
|
||||
return new KhabalGhoul(this);
|
||||
}
|
||||
}
|
52
Mage.Sets/src/mage/sets/archenemy/ForgottenAncient.java
Normal file
52
Mage.Sets/src/mage/sets/archenemy/ForgottenAncient.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.archenemy;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Blinke
|
||||
*/
|
||||
public class ForgottenAncient extends mage.sets.scourge.ForgottenAncient {
|
||||
|
||||
public ForgottenAncient(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 57;
|
||||
this.expansionSetCode = "ARC";
|
||||
}
|
||||
|
||||
public ForgottenAncient(final ForgottenAncient card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgottenAncient copy() {
|
||||
return new ForgottenAncient(this);
|
||||
}
|
||||
}
|
|
@ -44,6 +44,7 @@ import mage.constants.Rarity;
|
|||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -77,21 +78,21 @@ public class MakeshiftMannequin extends CardImpl {
|
|||
}
|
||||
|
||||
class MakeshiftMannequinEffect extends OneShotEffect {
|
||||
|
||||
|
||||
MakeshiftMannequinEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Return target creature card from your graveyard to the battlefield with a mannequin counter on it. For as long as that creature has a mannequin counter on it, it has \"When this creature becomes the target of a spell or ability, sacrifice it.\"";
|
||||
}
|
||||
|
||||
|
||||
MakeshiftMannequinEffect(final MakeshiftMannequinEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MakeshiftMannequinEffect copy() {
|
||||
return new MakeshiftMannequinEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
|
@ -99,12 +100,14 @@ class MakeshiftMannequinEffect extends OneShotEffect {
|
|||
UUID cardId = this.getTargetPointer().getFirst(game, source);
|
||||
Card card = controller.getGraveyard().get(cardId, game);
|
||||
if (card != null) {
|
||||
if (controller.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId())) {
|
||||
Counters counters = new Counters();
|
||||
counters.addCounter(CounterType.MANNEQUIN.createInstance());
|
||||
game.setEnterWithCounters(cardId, counters);
|
||||
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||
Permanent permanent = game.getPermanent(cardId);
|
||||
if (permanent != null) {
|
||||
permanent.addCounters(CounterType.MANNEQUIN.createInstance(), game);
|
||||
ContinuousEffect gainedEffect = new MakeshiftMannequinGainAbilityEffect();
|
||||
gainedEffect.setTargetPointer(new FixedTarget(cardId));
|
||||
gainedEffect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(gainedEffect, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,21 +28,18 @@
|
|||
package mage.sets.archenemy;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,22 +47,21 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author BursegSardaukar
|
||||
*/
|
||||
public class SkirkCommando extends CardImpl {
|
||||
|
||||
|
||||
public SkirkCommando(UUID ownerId) {
|
||||
super(ownerId, 47, "Skirk Commando", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
|
||||
this.expansionSetCode = "ARC";
|
||||
this.subtype.add("Goblin");
|
||||
this.subtype.add("Shaman");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
|
||||
//Whenever Skirk Commando deals combat damage to a player, you may have it deal 2 damage to target creature that player controls.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SkirkCommandoEffect(), true, true));
|
||||
|
||||
this.addAbility(new SkirkCommandoTriggeredAbility());
|
||||
|
||||
//Morph {2}{R} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.)
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{R}")));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public SkirkCommando(final SkirkCommando card) {
|
||||
|
@ -78,37 +74,33 @@ public class SkirkCommando extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SkirkCommandoEffect extends OneShotEffect {
|
||||
class SkirkCommandoTriggeredAbility extends DealsCombatDamageToAPlayerTriggeredAbility {
|
||||
|
||||
public SkirkCommandoEffect() {
|
||||
super(Outcome.Damage);
|
||||
staticText = "have it deal 2 damage to target creature that player controls";
|
||||
public SkirkCommandoTriggeredAbility() {
|
||||
super(new DamageTargetEffect(2), true, false);
|
||||
}
|
||||
|
||||
public SkirkCommandoEffect(final SkirkCommandoEffect effect) {
|
||||
super(effect);
|
||||
public SkirkCommandoTriggeredAbility(SkirkCommandoTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if (player != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + player.getLogName() + " controls");
|
||||
filter.add(new ControllerIdPredicate(player.getId()));
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Damage, source.getControllerId(), source.getSourceId(), game)) {
|
||||
UUID creature = target.getFirstTarget();
|
||||
if (creature != null) {
|
||||
game.getPermanent(creature).damage(2, source.getSourceId(), game, false, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (super.checkTrigger(event, game)) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that player controls");
|
||||
filter.add(new ControllerIdPredicate(event.getPlayerId()));
|
||||
addTarget(new TargetCreaturePermanent(filter));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkirkCommandoEffect copy() {
|
||||
return new SkirkCommandoEffect(this);
|
||||
public SkirkCommandoTriggeredAbility copy() {
|
||||
return new SkirkCommandoTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} deals combat damage to a player, you may have it deal 2 damage to target creature that player controls.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,11 +28,10 @@
|
|||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.*;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.AddCardSubtypeAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
|
@ -40,6 +39,12 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
|||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
@ -51,6 +56,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class CallToServe extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
|
@ -62,18 +68,22 @@ public class CallToServe extends CardImpl {
|
|||
this.expansionSetCode = "AVR";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
|
||||
// Enchant nonblack creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent(filter);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature gets +1/+2, has flying, and is an Angel in addition to its other types.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AddCardSubtypeAttachedEffect("Angel", Duration.WhileOnBattlefield, AttachmentType.AURA)));
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield));
|
||||
Effect effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA);
|
||||
effect.setText(", has flying");
|
||||
ability.addEffect(effect);
|
||||
effect = new AddCardSubtypeAttachedEffect("Angel", Duration.WhileOnBattlefield, AttachmentType.AURA);
|
||||
effect.setText(", and is an Angel in addition to its other types");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public CallToServe(final CallToServe card) {
|
||||
|
|
|
@ -38,15 +38,12 @@ import mage.abilities.common.AsEntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.abilities.mana.ConditionalAnyColorManaAbility;
|
||||
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||
import mage.abilities.mana.conditional.CreatureCastManaCondition;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
@ -55,10 +52,8 @@ import mage.constants.WatcherScope;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
/**
|
||||
|
@ -67,14 +62,12 @@ import mage.watchers.Watcher;
|
|||
*/
|
||||
public class CavernOfSouls extends CardImpl {
|
||||
|
||||
private static final String ruleText = "choose a creature type";
|
||||
|
||||
public CavernOfSouls(UUID ownerId) {
|
||||
super(ownerId, 226, "Cavern of Souls", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "AVR";
|
||||
|
||||
// As Cavern of Souls enters the battlefield, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new CavernOfSoulsEffect(), ruleText));
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)));
|
||||
|
||||
// {T}: Add {1} to your mana pool.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
@ -82,7 +75,7 @@ public class CavernOfSouls extends CardImpl {
|
|||
// {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type, and that spell can't be countered.
|
||||
Ability ability = new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new CavernOfSoulsManaBuilder(), true);
|
||||
this.addAbility(ability, new CavernOfSoulsWatcher(ability.getOriginalId()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new CavernOfSoulsCantCounterEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new CavernOfSoulsCantCounterEffect()));
|
||||
}
|
||||
|
||||
public CavernOfSouls(final CavernOfSouls card) {
|
||||
|
@ -95,60 +88,23 @@ public class CavernOfSouls extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class CavernOfSoulsEffect extends OneShotEffect {
|
||||
|
||||
public CavernOfSoulsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "As {this} enters the battlefield, choose a creature type";
|
||||
}
|
||||
|
||||
public CavernOfSoulsEffect(final CavernOfSoulsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && permanent != null) {
|
||||
Choice typeChoice = new ChoiceImpl(true);
|
||||
typeChoice.setMessage("Choose creature type");
|
||||
typeChoice.setChoices(CardRepository.instance.getCreatureTypes());
|
||||
while (!player.choose(Outcome.Benefit, typeChoice, game)) {
|
||||
if (!player.canRespond()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
|
||||
permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()), game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CavernOfSoulsEffect copy() {
|
||||
return new CavernOfSoulsEffect(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CavernOfSoulsManaBuilder extends ConditionalManaBuilder {
|
||||
|
||||
String creatureType;
|
||||
|
||||
|
||||
@Override
|
||||
public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) {
|
||||
Object value = game.getState().getValue(source.getSourceId() + "_type");
|
||||
if (value != null && value instanceof String) {
|
||||
creatureType = (String) value;
|
||||
}
|
||||
}
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() +
|
||||
" (can only be spend to cast for creatures of type " + creatureType + " and that spell can't be countered)");
|
||||
}
|
||||
return super.setMana(mana, source, game);
|
||||
game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName()
|
||||
+ " (can only be spend to cast for creatures of type " + creatureType + " and that spell can't be countered)");
|
||||
}
|
||||
return super.setMana(mana, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -174,11 +130,11 @@ class CavernOfSoulsConditionalMana extends ConditionalMana {
|
|||
class CavernOfSoulsManaCondition extends CreatureCastManaCondition {
|
||||
|
||||
String creatureType;
|
||||
|
||||
|
||||
CavernOfSoulsManaCondition(String creatureType) {
|
||||
this.creatureType = creatureType;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, UUID manaProducer) {
|
||||
// check: ... to cast a creature spell
|
||||
|
@ -197,7 +153,7 @@ class CavernOfSoulsWatcher extends Watcher {
|
|||
|
||||
private List<UUID> spells = new ArrayList<>();
|
||||
private final String originalId;
|
||||
|
||||
|
||||
public CavernOfSoulsWatcher(UUID originalId) {
|
||||
super("ManaPaidFromCavernOfSoulsWatcher", WatcherScope.CARD);
|
||||
this.originalId = originalId.toString();
|
||||
|
@ -222,7 +178,7 @@ class CavernOfSoulsWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean spellCantBeCountered(UUID spellId) {
|
||||
return spells.contains(spellId);
|
||||
}
|
||||
|
|
|
@ -27,20 +27,23 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.MiracleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +55,6 @@ public class DevastationTide extends CardImpl {
|
|||
super(ownerId, 48, "Devastation Tide", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}{U}");
|
||||
this.expansionSetCode = "AVR";
|
||||
|
||||
|
||||
// Return all nonland permanents to their owners' hands.
|
||||
this.getSpellAbility().addEffect(new DevastationTideEffect());
|
||||
|
||||
|
@ -83,10 +85,17 @@ class DevastationTideEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterNonlandPermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
||||
creature.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Set<Card> cardsToHand = new LinkedHashSet<>();
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterNonlandPermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
||||
cardsToHand.add((Card) permanent);
|
||||
}
|
||||
controller.moveCards(cardsToHand, null, Zone.HAND, source, game);
|
||||
return true;
|
||||
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import mage.constants.*;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -37,9 +38,15 @@ import mage.abilities.effects.ReplacementEffectImpl;
|
|||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
|
@ -47,8 +54,6 @@ import mage.target.TargetPermanent;
|
|||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.util.functions.EmptyApplyToPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
|
@ -60,7 +65,6 @@ public class InfiniteReflection extends CardImpl {
|
|||
this.expansionSetCode = "AVR";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
|
@ -109,9 +113,9 @@ class InfiniteReflectionTriggeredEffect extends OneShotEffect {
|
|||
if (sourcePermanent != null && sourcePermanent.getAttachedTo() != null) {
|
||||
Permanent toCopyFromPermanent = game.getPermanent(sourcePermanent.getAttachedTo());
|
||||
if (toCopyFromPermanent != null) {
|
||||
for (Permanent toCopyToPermanent: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||
for (Permanent toCopyToPermanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||
if (!toCopyToPermanent.equals(toCopyFromPermanent) && !(toCopyToPermanent instanceof PermanentToken)) {
|
||||
game.copyPermanent(toCopyFromPermanent, toCopyToPermanent, source, new EmptyApplyToPermanent());
|
||||
game.copyPermanent(toCopyFromPermanent, toCopyToPermanent.getId(), source, new EmptyApplyToPermanent());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -135,24 +139,23 @@ class InfiniteReflectionEntersBattlefieldEffect extends ReplacementEffectImpl {
|
|||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
return permanent != null && permanent.getControllerId().equals(source.getControllerId())
|
||||
&& permanent.getCardType().contains(CardType.CREATURE)
|
||||
&& !(permanent instanceof PermanentToken);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent toCopyToPermanent = game.getPermanent(event.getTargetId());
|
||||
MageObject toCopyToObject = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null && toCopyToPermanent != null && sourcePermanent.getAttachedTo() != null) {
|
||||
if (sourcePermanent != null && toCopyToObject != null && sourcePermanent.getAttachedTo() != null) {
|
||||
Permanent toCopyFromPermanent = game.getPermanent(sourcePermanent.getAttachedTo());
|
||||
if (toCopyFromPermanent != null) {
|
||||
game.copyPermanent(toCopyFromPermanent, toCopyToPermanent, source, new EmptyApplyToPermanent());
|
||||
game.copyPermanent(toCopyFromPermanent, toCopyToObject.getId(), source, new EmptyApplyToPermanent());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -74,51 +74,3 @@ public class PillarOfFlame extends CardImpl {
|
|||
return new PillarOfFlame(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PillarOfFlameEffect extends ReplacementEffectImpl {
|
||||
|
||||
public PillarOfFlameEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Exile);
|
||||
staticText = "If a creature dealt damage this way would die this turn, exile it instead";
|
||||
}
|
||||
|
||||
public PillarOfFlameEffect(final PillarOfFlameEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PillarOfFlameEffect copy() {
|
||||
return new PillarOfFlameEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||
if (controller != null && permanent != null) {
|
||||
return controller.moveCards(permanent, Zone.BATTLEFIELD, Zone.EXILED, source, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ZONE_CHANGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (((ZoneChangeEvent) event).isDiesEvent()) {
|
||||
DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId());
|
||||
if (watcher != null) {
|
||||
return watcher.wasDamaged(event.getTargetId(), game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
/**
|
||||
*
|
||||
* @author noxx
|
||||
|
||||
*
|
||||
*/
|
||||
public class RestorationAngel extends CardImpl {
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class RestorationAngel extends CardImpl {
|
|||
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
|
||||
// When Restoration Angel enters the battlefield, you may exile target non-Angel creature you control, then return that card to the battlefield under your control
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new RestorationAngelEffect(), true);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false));
|
||||
|
@ -111,11 +111,13 @@ class RestorationAngelEffect extends OneShotEffect {
|
|||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||
if (permanent != null && sourcePermanent != null) {
|
||||
controller.moveCardToExileWithInfo(permanent, source.getSourceId(), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true);
|
||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||
if (card != null) {
|
||||
Zone currentZone = game.getState().getZone(card.getId());
|
||||
return controller.putOntoBattlefieldWithInfo(card, game, currentZone, source.getSourceId());
|
||||
int zcc = permanent.getZoneChangeCounter(game);
|
||||
controller.moveCards(permanent, Zone.EXILED, source, game);
|
||||
Card card = game.getCard(permanent.getId());
|
||||
if (card != null
|
||||
&& card.getZoneChangeCounter(game) == zcc + 1
|
||||
&& game.getState().getZone(card.getId()).equals(Zone.EXILED)) {
|
||||
return controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,27 +27,28 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import mage.constants.*;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
@ -66,7 +67,7 @@ public class RidersOfGavony extends CardImpl {
|
|||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// As Riders of Gavony enters the battlefield, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new RidersOfGavonyEffect()));
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Protect)));
|
||||
|
||||
// Human creatures you control have protection from creatures of the chosen type.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RidersOfGavonyGainAbilityControlledEffect()));
|
||||
|
@ -82,46 +83,6 @@ public class RidersOfGavony extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class RidersOfGavonyEffect extends OneShotEffect {
|
||||
|
||||
public RidersOfGavonyEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "choose a creature type";
|
||||
}
|
||||
|
||||
public RidersOfGavonyEffect(final RidersOfGavonyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && permanent != null) {
|
||||
Choice typeChoice = new ChoiceImpl(true);
|
||||
typeChoice.setMessage("Choose creature type");
|
||||
typeChoice.setChoices(CardRepository.instance.getCreatureTypes());
|
||||
while (!player.choose(Outcome.BoostCreature, typeChoice, game)) {
|
||||
if (!player.canRespond()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (typeChoice.getChoice() != null) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + typeChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
|
||||
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice() + "</i>", game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RidersOfGavonyEffect copy() {
|
||||
return new RidersOfGavonyEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human creatures you control");
|
||||
|
@ -154,13 +115,13 @@ class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl {
|
|||
if (permanent != null) {
|
||||
String subtype = (String) game.getState().getValue(permanent.getId() + "_type");
|
||||
if (subtype != null) {
|
||||
protectionFilter = new FilterPermanent(subtype+"s");
|
||||
protectionFilter = new FilterPermanent(subtype + "s");
|
||||
protectionFilter.add(new SubtypePredicate(subtype));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (protectionFilter != null) {
|
||||
for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||
for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||
perm.addAbility(new ProtectionAbility(protectionFilter), source.getSourceId(), game);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -30,19 +30,18 @@ package mage.sets.avacynrestored;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GetEmblemEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect.HandSizeModification;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
@ -50,7 +49,6 @@ import mage.constants.Rarity;
|
|||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
|
@ -71,8 +69,7 @@ public class TamiyoTheMoonSage extends CardImpl {
|
|||
this.expansionSetCode = "AVR";
|
||||
this.subtype.add("Tamiyo");
|
||||
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4));
|
||||
|
||||
// +1: Tap target permanent. It doesn't untap during its controller's next untap step.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new TapTargetEffect(), 1);
|
||||
|
@ -130,7 +127,8 @@ class TappedCreaturesControlledByTargetCount implements DynamicValue {
|
|||
}
|
||||
|
||||
/**
|
||||
* Emblem with "You have no maximum hand size" and "Whenever a card is put into your graveyard from anywhere, you may return it to your hand."
|
||||
* Emblem with "You have no maximum hand size" and "Whenever a card is put into
|
||||
* your graveyard from anywhere, you may return it to your hand."
|
||||
*/
|
||||
class TamiyoTheMoonSageEmblem extends Emblem {
|
||||
|
||||
|
|
|
@ -29,29 +29,27 @@ package mage.sets.avacynrestored;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardControllerEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -70,8 +68,7 @@ public class TibaltTheFiendBlooded extends CardImpl {
|
|||
this.expansionSetCode = "AVR";
|
||||
this.subtype.add("Tibalt");
|
||||
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(2)), false));
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(2));
|
||||
|
||||
// +1: Draw a card, then discard a card at random.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new DrawCardSourceControllerEffect(1), 1);
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -77,7 +78,7 @@ class BringToLightEffect extends OneShotEffect {
|
|||
public BringToLightEffect() {
|
||||
super(Outcome.PlayForFree);
|
||||
this.staticText = "<i>Converge</i> — Search your library for a creature, instant, or sorcery card with converted mana "
|
||||
+ "cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, "
|
||||
+ "cost less than or equal to the number of colors of mana spent to cast {this}, exile that card, "
|
||||
+ "then shuffle your library. You may cast that card without paying its mana cost";
|
||||
}
|
||||
|
||||
|
@ -102,12 +103,16 @@ class BringToLightEffect extends OneShotEffect {
|
|||
controller.searchLibrary(target, game);
|
||||
Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.moveCards(card, null, Zone.EXILED, source, game);
|
||||
controller.moveCards(card, Zone.EXILED, source, game);
|
||||
}
|
||||
controller.shuffleLibrary(game);
|
||||
if (card != null) {
|
||||
if (controller.chooseUse(outcome, "Cast " + card.getName() + " without paying its mana cost?", source, game)) {
|
||||
controller.cast(card.getSpellAbility(), game, true);
|
||||
if (card.getSpellAbility() != null) {
|
||||
controller.cast(card.getSpellAbility(), game, true);
|
||||
} else {
|
||||
Logger.getLogger(BringToLightEffect.class).error("Bring to Light: spellAbility == null " + card.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -47,9 +47,9 @@ import mage.filter.predicate.mageobject.SupertypePredicate;
|
|||
* @author fireshoes
|
||||
*/
|
||||
public class CanopyVista extends CardImpl {
|
||||
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
}
|
||||
|
|
|
@ -59,8 +59,7 @@ public class DustStalker extends CardImpl {
|
|||
public DustStalker(UUID ownerId) {
|
||||
super(ownerId, 202, "Dust Stalker", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{R}");
|
||||
this.expansionSetCode = "BFZ";
|
||||
this.supertype.add("Creautre");
|
||||
this.supertype.add("Eldrazi");
|
||||
this.subtype.add("Eldrazi");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
@ -39,14 +39,12 @@ import mage.abilities.effects.common.GetEmblemEffect;
|
|||
import mage.abilities.effects.common.PreventAllDamageToSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
|
@ -61,7 +59,7 @@ public class GideonAllyOfZendikar extends CardImpl {
|
|||
this.expansionSetCode = "BFZ";
|
||||
this.subtype.add("Gideon");
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4));
|
||||
|
||||
// +1: Until end of turn, Gideon, Ally of Zendikar becomes a 5/5 Human Soldier Ally creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new BecomesCreatureSourceEffect(new GideonAllyOfZendikarToken(), "planeswalker", Duration.EndOfTurn), 1);
|
||||
|
|
|
@ -32,13 +32,12 @@ import mage.MageInt;
|
|||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.GetEmblemEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
|
@ -48,7 +47,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
|
@ -73,7 +71,7 @@ public class KioraMasterOfTheDepths extends CardImpl {
|
|||
this.expansionSetCode = "BFZ";
|
||||
this.subtype.add("Kiora");
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4));
|
||||
|
||||
// +1: Untap up to one target creature and up to one target land.
|
||||
LoyaltyAbility ability1 = new LoyaltyAbility(new KioraUntapEffect(), 1);
|
||||
|
|
|
@ -30,18 +30,16 @@ package mage.sets.battleforzendikar;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GetEmblemTargetPlayerEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -60,7 +58,7 @@ public class ObNixilisReignited extends CardImpl {
|
|||
this.expansionSetCode = "BFZ";
|
||||
this.subtype.add("Nixilis");
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false));
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5));
|
||||
|
||||
// +1: You draw a card and you lose 1 life.
|
||||
Effect effect = new DrawCardSourceControllerEffect(1);
|
||||
|
|
|
@ -111,7 +111,7 @@ class OblivionSowerEffect extends OneShotEffect {
|
|||
+ targetPlayer.getName() + " to put into play under your control");
|
||||
TargetCard targetCards = new TargetCard(0, exiledLands.size(), Zone.EXILED, filterToPlay);
|
||||
if (controller.chooseTarget(outcome, exiledLands, targetCards, source, game)) {
|
||||
controller.moveCards(new CardsImpl(targetCards.getTargets()), null, Zone.BATTLEFIELD, source, game);
|
||||
controller.moveCards(new CardsImpl(targetCards.getTargets()), Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -60,8 +60,8 @@ public class OranRiefHydra extends CardImpl {
|
|||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// <i>Landfall</i> - Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra.
|
||||
|
||||
// <i>Landfall</i> - Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra.
|
||||
// If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead.
|
||||
this.addAbility(new OranRiefHydraTriggeredAbility());
|
||||
}
|
||||
|
@ -77,9 +77,9 @@ public class OranRiefHydra extends CardImpl {
|
|||
}
|
||||
|
||||
class OranRiefHydraTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final String text = "<i>Landfall</i> - Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. "
|
||||
+ "If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead.";
|
||||
|
||||
private static final String text = "<i>Landfall</i> - Whenever a land enters the battlefield under your control, put a +1/+1 counter on {this}. "
|
||||
+ "If that land is a Forest, put two +1/+1 counters on {this} instead.";
|
||||
|
||||
public OranRiefHydraTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new OranRiefHydraEffect());
|
||||
|
@ -106,12 +106,13 @@ class OranRiefHydraTriggeredAbility extends TriggeredAbilityImpl {
|
|||
&& permanent.getCardType().contains(CardType.LAND)
|
||||
&& permanent.getControllerId().equals(getControllerId())) {
|
||||
Permanent sourcePermanent = game.getPermanent(getSourceId());
|
||||
if (sourcePermanent != null)
|
||||
if (sourcePermanent != null) {
|
||||
for (Effect effect : getEffects()) {
|
||||
if (effect instanceof OranRiefHydraEffect) {
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
if (effect instanceof OranRiefHydraEffect) {
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -57,7 +57,7 @@ public class PrismArray extends CardImpl {
|
|||
// <i>Converge</i> - Prism Array enters the battlefield with a crystal counter on it for each color of mana spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.CRYSTAL.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true),
|
||||
null, true, "<i>Converge</i> — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null));
|
||||
null, "<i>Converge</i> — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null));
|
||||
|
||||
// Remove a crystal counter from Prism Array: Tap target creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -60,9 +61,23 @@ public class SerpentineSpike extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
// Serpentine Spike deals 2 damage to target creature, 3 damage to another target creature, and 4 damage to a third target creature. If a creature dealt damage this way would die this turn, exile it instead.
|
||||
this.getSpellAbility().addEffect(new SerpentineSpikeEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (2 damage)")));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (3 damage)")));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (4 damage)")));
|
||||
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(new FilterCreaturePermanent("creature (2 damage)"));
|
||||
target.setTargetTag(1);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature (3 damage)");
|
||||
filter.add(new AnotherTargetPredicate(2));
|
||||
target = new TargetCreaturePermanent(filter);
|
||||
target.setTargetTag(2);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
filter = new FilterCreaturePermanent("another target creature (4 damage)");
|
||||
filter.add(new AnotherTargetPredicate(3));
|
||||
target = new TargetCreaturePermanent(filter);
|
||||
target.setTargetTag(3);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn);
|
||||
effect.setText("If a creature dealt damage this way would die this turn, exile it instead");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
|
|
|
@ -59,7 +59,7 @@ public class SkyriderElf extends CardImpl {
|
|||
// <i>Converge</i>-Skyrider Elf enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true),
|
||||
null, true, "<i>Converge</i> — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null));
|
||||
null, "<i>Converge</i> — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -113,4 +113,3 @@ class SmotheringAbominationTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return "Whenever you sacrifice a creature, " + super.getRule();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class TajuruStalwart extends CardImpl {
|
|||
// <i>Converge</i> - Tajuru Stalwart enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true),
|
||||
null, true, "<i>Converge</i> - {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null));
|
||||
null, "<i>Converge</i> - {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -67,10 +67,10 @@ public class UlamogTheCeaselessHunger extends CardImpl {
|
|||
|
||||
// When you cast Ulamog, the Ceaseless Hunger, exile two target permanents.
|
||||
this.addAbility(new UlamogExilePermanentsOnCastAbility());
|
||||
|
||||
|
||||
// Indestructible
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
|
||||
// Whenever Ulamog attacks, defending player exiles the top twenty cards of his or her library.
|
||||
Effect effect = new UlamogExileLibraryEffect();
|
||||
effect.setText("defending player exiles the top twenty cards of his or her library");
|
||||
|
@ -139,18 +139,20 @@ class UlamogAttackTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ATTACKER_DECLARED;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent sourcePermanent = game.getPermanent(this.getSourceId());
|
||||
if (sourcePermanent != null && event.getSourceId() == this.getSourceId()) {
|
||||
if (sourcePermanent != null
|
||||
&& event.getSourceId() != null
|
||||
&& event.getSourceId().equals(this.getSourceId())) {
|
||||
UUID defender = game.getCombat().getDefendingPlayerId(this.getSourceId(), game);
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(defender));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return new StringBuilder("Whenever {this} attacks, ").append(super.getRule()).toString();
|
||||
|
@ -184,8 +186,8 @@ class UlamogExileLibraryEffect extends OneShotEffect {
|
|||
card.moveToExile(null, null, source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public class UlamogsDespoiler extends CardImpl {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
// As Ulamog's Despoiler enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, Ulamog's Despoiler enters the battlefield with four +1/+1 counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new UlamogsDespoilerEffect(), null, true,
|
||||
this.addAbility(new EntersBattlefieldAbility(new UlamogsDespoilerEffect(), null,
|
||||
"As {this} enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, {this} enters the battlefield with four +1/+1 counters on it", null));
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -115,9 +116,9 @@ class VoidWinnowerCantCastEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
if (object != null) {
|
||||
if (object != null && (object instanceof Spell)) {
|
||||
// the low bit will always be set on an odd number.
|
||||
return (object.getManaCost().convertedManaCost() & 1) == 0;
|
||||
return (((Spell) object).getConvertedManaCost() & 1) == 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -59,7 +59,7 @@ public class WoodlandWanderer extends CardImpl {
|
|||
// <i>Converge</i> - Woodland Wanderer enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(), ColorsOfManaSpentToCastCount.getInstance(), true),
|
||||
null, true, "<i>Converge</i> — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null));
|
||||
null, "<i>Converge</i> — {this} enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it.", null));
|
||||
}
|
||||
|
||||
public WoodlandWanderer(final WoodlandWanderer card) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class BlindingPowder extends CardImpl {
|
|||
// Equipped creature has "Unattach Blinding Powder: Prevent all combat damage that would be dealt to this creature this turn."
|
||||
Effect effect = new PreventCombatDamageToSourceEffect(Duration.EndOfTurn);
|
||||
effect.setText("Prevent all combat damage that would be dealt to this creature this turn");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new BlindingPowderUnattachCost());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new BlindingPowderUnattachCost(getName(), getId()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.EQUIPMENT, Duration.WhileOnBattlefield)));
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.PreventDamage, new GenericManaCost(2)));
|
||||
|
@ -79,28 +79,32 @@ public class BlindingPowder extends CardImpl {
|
|||
|
||||
class BlindingPowderUnattachCost extends CostImpl {
|
||||
|
||||
public BlindingPowderUnattachCost() {
|
||||
this.text = "Unattach Blinding Powder";
|
||||
protected UUID sourceEquipmentId;
|
||||
|
||||
public BlindingPowderUnattachCost(String name, UUID sourceId) {
|
||||
this.text = "Unattach " + name;
|
||||
this.sourceEquipmentId = sourceId;
|
||||
}
|
||||
|
||||
public BlindingPowderUnattachCost(final BlindingPowderUnattachCost cost) {
|
||||
super(cost);
|
||||
this.sourceEquipmentId = cost.sourceEquipmentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||
Permanent permanent = game.getPermanent(sourceId);
|
||||
if (permanent != null) {
|
||||
for (UUID attachmentId :permanent.getAttachments()) {
|
||||
for (UUID attachmentId : permanent.getAttachments()) {
|
||||
Permanent attachment = game.getPermanent(attachmentId);
|
||||
if (attachment != null && attachment.getName().equals("Blinding Powder")) {
|
||||
if (attachment != null && attachment.getId().equals(sourceEquipmentId)) {
|
||||
paid = permanent.removeAttachment(attachmentId, game);
|
||||
if (paid) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return paid;
|
||||
}
|
||||
|
@ -109,9 +113,9 @@ class BlindingPowderUnattachCost extends CostImpl {
|
|||
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||
Permanent permanent = game.getPermanent(sourceId);
|
||||
if (permanent != null) {
|
||||
for (UUID attachmentId :permanent.getAttachments()) {
|
||||
for (UUID attachmentId : permanent.getAttachments()) {
|
||||
Permanent attachment = game.getPermanent(attachmentId);
|
||||
if (attachment != null && attachment.getName().equals("Blinding Powder")) {
|
||||
if (attachment != null && attachment.getId().equals(sourceEquipmentId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ public class GenjuOfTheRealm extends CardImpl {
|
|||
super(ownerId, 151, "Genju of the Realm", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{W}{U}{B}{R}{G}");
|
||||
this.expansionSetCode = "BOK";
|
||||
this.subtype.add("Aura");
|
||||
this.supertype.add("Legendary");
|
||||
|
||||
|
||||
// Enchant Land
|
||||
|
|
|
@ -110,12 +110,12 @@ class GoryosVengeanceEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||
if (card != null) {
|
||||
if (controller.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId())) {
|
||||
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null) {
|
||||
// Haste
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
// Exile it at end of turn
|
||||
Effect exileEffect = new ExileTargetEffect("Exile " + permanent.getName() + " at the beginning of the next end step");
|
||||
|
|
|
@ -84,26 +84,26 @@ public class IwamoriOfTheOpenFist extends CardImpl {
|
|||
class IwamoriOfTheOpenFistEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("legendary creature card");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
|
||||
public IwamoriOfTheOpenFistEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "each opponent may put a legendary creature card from his or her hand onto the battlefield";
|
||||
}
|
||||
|
||||
|
||||
public IwamoriOfTheOpenFistEffect(final IwamoriOfTheOpenFistEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IwamoriOfTheOpenFistEffect copy() {
|
||||
return new IwamoriOfTheOpenFistEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
|
@ -123,14 +123,7 @@ class IwamoriOfTheOpenFistEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (cards.size() > 0) {
|
||||
for (Card card: cards.getCards(game)) {
|
||||
Player player = game.getPlayer(card.getOwnerId());
|
||||
if (player != null) {
|
||||
player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId());
|
||||
}
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards.getCards(game), Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -52,12 +50,6 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class KitsunePalliator extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai you control");
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new SubtypePredicate("Samurai"));
|
||||
}
|
||||
|
||||
public KitsunePalliator(UUID ownerId) {
|
||||
super(ownerId, 14, "Kitsune Palliator", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.expansionSetCode = "BOK";
|
||||
|
|
|
@ -62,7 +62,7 @@ public class MinamoSightbender extends CardImpl {
|
|||
this.subtype.add("Wizard");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {X}, {T}: Target creature with power X or less can't be blocked this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new ManaCostsImpl("{X}"));
|
||||
|
|
|
@ -28,13 +28,17 @@
|
|||
package mage.sets.betrayersofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.*;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -47,7 +51,7 @@ public class OrbOfDreams extends CardImpl {
|
|||
public OrbOfDreams(UUID ownerId) {
|
||||
super(ownerId, 156, "Orb of Dreams", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
this.expansionSetCode = "BOK";
|
||||
|
||||
|
||||
// Permanents enter the battlefield tapped.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OrbOfDreamsEffect()));
|
||||
}
|
||||
|
@ -60,7 +64,7 @@ public class OrbOfDreams extends CardImpl {
|
|||
public OrbOfDreams copy() {
|
||||
return new OrbOfDreams(this);
|
||||
}
|
||||
|
||||
|
||||
private class OrbOfDreamsEffect extends ReplacementEffectImpl {
|
||||
|
||||
OrbOfDreamsEffect() {
|
||||
|
@ -79,23 +83,22 @@ public class OrbOfDreams extends CardImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
if (permanent != null) {
|
||||
permanent.setTapped(true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.OfferingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -100,13 +100,8 @@ class PatronOfTheMoonEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
TargetCard target = new TargetCardInHand(0, 2, new FilterLandCard("up to two land cards to put onto the battlefield tapped"));
|
||||
controller.chooseTarget(outcome, controller.getHand(), target, source, game);
|
||||
for (UUID cardId : target.getTargets()) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId(), true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return controller.moveCards(new CardsImpl(target.getTargets()).getCards(game),
|
||||
Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
package mage.sets.betrayersofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.PreventionEffectData;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.abilities.effects.RedirectionEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -44,7 +44,6 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -60,7 +59,6 @@ public class WardOfPiety extends CardImpl {
|
|||
this.expansionSetCode = "BOK";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
|
@ -84,10 +82,12 @@ public class WardOfPiety extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class WardOfPietyPreventDamageTargetEffect extends PreventionEffectImpl {
|
||||
class WardOfPietyPreventDamageTargetEffect extends RedirectionEffect {
|
||||
|
||||
protected MageObjectReference redirectToObject;
|
||||
|
||||
public WardOfPietyPreventDamageTargetEffect() {
|
||||
super(Duration.EndOfTurn, 1, false, true);
|
||||
super(Duration.EndOfTurn, 1, true);
|
||||
staticText = "The next 1 damage that would be dealt to enchanted creature this turn is dealt to target creature or player instead";
|
||||
}
|
||||
|
||||
|
@ -106,35 +106,21 @@ class WardOfPietyPreventDamageTargetEffect extends PreventionEffectImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
PreventionEffectData preventionData = preventDamageAction(event, source, game);
|
||||
// deal damage now
|
||||
if (preventionData.getPreventedDamage() > 0) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " damage to " + permanent.getLogName() + " instead");
|
||||
// keep the original source id as it is redirecting
|
||||
permanent.damage(preventionData.getPreventedDamage(), event.getSourceId(), game, false, true);
|
||||
}
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player != null) {
|
||||
game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " damage to " + player.getLogName() + " instead");
|
||||
// keep the original source id as it is redirecting
|
||||
player.damage(preventionData.getPreventedDamage(), event.getSourceId(), game, false, true);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
public void init(Ability source, Game game) {
|
||||
super.init(source, game);
|
||||
redirectToObject = new MageObjectReference(source.getTargets().get(0).getFirstTarget(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (super.applies(event, source, game)) {
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
if (enchantment != null && event.getTargetId().equals(enchantment.getAttachedTo())) {
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
if (enchantment != null && event.getTargetId().equals(enchantment.getAttachedTo())) {
|
||||
if (redirectToObject.equals(new MageObjectReference(source.getTargets().get(0).getFirstTarget(), game))) {
|
||||
redirectTarget = source.getTargets().get(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,20 +32,18 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GetEmblemEffect;
|
||||
import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -64,6 +62,7 @@ import mage.util.CardUtil;
|
|||
public class KioraTheCrashingWave extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("permanent an opponent control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
@ -73,8 +72,7 @@ public class KioraTheCrashingWave extends CardImpl {
|
|||
this.expansionSetCode = "BNG";
|
||||
this.subtype.add("Kiora");
|
||||
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(2)), false));
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(2));
|
||||
|
||||
// +1: Until your next turn, prevent all damage that would be dealt to and dealt by target permanent an opponent controls.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new KioraPreventionEffect(), 1);
|
||||
|
@ -89,7 +87,6 @@ public class KioraTheCrashingWave extends CardImpl {
|
|||
// -5: You get an emblem with "At the beginning of your end step, put a 9/9 blue Kraken creature token onto the battlefield."
|
||||
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new KioraEmblem()), -5));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public KioraTheCrashingWave(final KioraTheCrashingWave card) {
|
||||
|
@ -126,10 +123,10 @@ class KioraPreventionEffect extends PreventionEffectImpl {
|
|||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
super.init(source, game);
|
||||
for(UUID targetId :this.getTargetPointer().getTargets(game, source)) {
|
||||
for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
permanent.addInfo(new StringBuilder("kioraPrevention").append(getId()).toString(),CardUtil.addToolTipMarkTags("All damage that would be dealt to and dealt by this permanent is prevented."), game);
|
||||
permanent.addInfo(new StringBuilder("kioraPrevention").append(getId()).toString(), CardUtil.addToolTipMarkTags("All damage that would be dealt to and dealt by this permanent is prevented."), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +135,7 @@ class KioraPreventionEffect extends PreventionEffectImpl {
|
|||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (super.applies(event, source, game) && event instanceof DamageEvent) {
|
||||
Permanent targetPermanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||
if (targetPermanent != null
|
||||
if (targetPermanent != null
|
||||
&& (event.getSourceId().equals(targetPermanent.getId()) || event.getTargetId().equals(targetPermanent.getId()))) {
|
||||
return true;
|
||||
}
|
||||
|
@ -149,10 +146,10 @@ class KioraPreventionEffect extends PreventionEffectImpl {
|
|||
@Override
|
||||
public boolean isInactive(Ability source, Game game) {
|
||||
if (super.isInactive(source, game)) {
|
||||
for(UUID targetId :this.getTargetPointer().getTargets(game, source)) {
|
||||
for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
permanent.addInfo(new StringBuilder("kioraPrevention").append(getId()).toString(),"", game);
|
||||
permanent.addInfo(new StringBuilder("kioraPrevention").append(getId()).toString(), "", game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -162,9 +159,11 @@ class KioraPreventionEffect extends PreventionEffectImpl {
|
|||
}
|
||||
|
||||
/**
|
||||
* Emblem: "At the beginning of your end step, put a 9/9 blue Kraken creature token onto the battlefield."
|
||||
* Emblem: "At the beginning of your end step, put a 9/9 blue Kraken creature
|
||||
* token onto the battlefield."
|
||||
*/
|
||||
class KioraEmblem extends Emblem {
|
||||
|
||||
public KioraEmblem() {
|
||||
this.setName("EMBLEM: Kiora, the Crashing Wave");
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.COMMAND, new CreateTokenEffect(new KioraKrakenToken()), TargetController.YOU, null, false);
|
||||
|
|
|
@ -29,7 +29,6 @@ package mage.sets.bornofthegods;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.TributeNotPaidCondition;
|
||||
|
|
|
@ -113,14 +113,13 @@ class PeregrinationEffect extends OneShotEffect {
|
|||
TargetCard target2 = new TargetCard(Zone.LIBRARY, filter);
|
||||
controller.choose(Outcome.Benefit, revealed, target2, game);
|
||||
Card card = revealed.get(target2.getFirstTarget(), game);
|
||||
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), true);
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
revealed.remove(card);
|
||||
card = revealed.getCards(game).iterator().next();
|
||||
controller.moveCards(card, null, Zone.HAND, source, game);
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
} else if (target.getTargets().size() == 1) {
|
||||
Card card = revealed.getCards(game).iterator().next();
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), true);
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class SpitefulReturned extends CardImpl {
|
|||
effect.setText("defending player loses 2 life");
|
||||
this.addAbility(new SpitefulReturnedTriggeredAbility(effect));
|
||||
// Enchanted creature gets +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1,1, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield)));
|
||||
}
|
||||
|
||||
public SpitefulReturned(final SpitefulReturned card) {
|
||||
|
@ -105,7 +105,8 @@ class SpitefulReturnedTriggeredAbility extends TriggeredAbilityImpl {
|
|||
Permanent sourcePermanent = game.getPermanent(this.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
if (sourcePermanent.getCardType().contains(CardType.CREATURE)) {
|
||||
if (event.getSourceId() == this.getSourceId()) {
|
||||
if (event.getSourceId() != null
|
||||
&& event.getSourceId().equals(this.getSourceId())) {
|
||||
UUID defender = game.getCombat().getDefendingPlayerId(this.getSourceId(), game);
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(defender));
|
||||
return true;
|
||||
|
|
|
@ -54,7 +54,7 @@ public class CrushingPain extends CardImpl {
|
|||
public CrushingPain (UUID ownerId) {
|
||||
super(ownerId, 162, "Crushing Pain", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
// Crushing Pain deals 6 damage to target creature that was dealt damage this turn.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(6));
|
||||
|
|
|
@ -45,7 +45,7 @@ public class EtherealHaze extends CardImpl {
|
|||
public EtherealHaze (UUID ownerId) {
|
||||
super(ownerId, 9, "Ethereal Haze", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
// Prevent all damage that would be dealt by creatures this turn.
|
||||
this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(new FilterCreaturePermanent("creatures"), Duration.EndOfTurn, false));
|
||||
|
|
|
@ -69,7 +69,7 @@ public class HallOfTheBanditLord extends CardImpl {
|
|||
|
||||
// Hall of the Bandit Lord enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
|
||||
// {T}, Pay 3 life: Add {1} to your mana pool. If that mana is spent on a creature spell, it gains haste.
|
||||
Mana mana = Mana.ColorlessMana;
|
||||
mana.setFlag(true);
|
||||
|
@ -94,12 +94,12 @@ class HallOfTheBanditLordWatcher extends Watcher {
|
|||
|
||||
private final Ability source;
|
||||
private final List<UUID> creatures = new ArrayList<>();
|
||||
|
||||
|
||||
HallOfTheBanditLordWatcher(Ability source) {
|
||||
super("HallOfTheBanditLordWatcher", WatcherScope.CARD);
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
|
||||
HallOfTheBanditLordWatcher(final HallOfTheBanditLordWatcher watcher) {
|
||||
super(watcher);
|
||||
this.creatures.addAll(watcher.creatures);
|
||||
|
@ -110,22 +110,25 @@ class HallOfTheBanditLordWatcher extends Watcher {
|
|||
public HallOfTheBanditLordWatcher copy() {
|
||||
return new HallOfTheBanditLordWatcher(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.MANA_PAYED) {
|
||||
MageObject target = game.getObject(event.getTargetId());
|
||||
if (event.getSourceId() == this.getSourceId() && target != null && target.getCardType().contains(CardType.CREATURE) && event.getFlag()) {
|
||||
if (event.getSourceId() != null
|
||||
&& event.getSourceId().equals(this.getSourceId())
|
||||
&& target != null && target.getCardType().contains(CardType.CREATURE)
|
||||
&& event.getFlag()) {
|
||||
if (target instanceof Spell) {
|
||||
this.creatures.add(((Spell) target).getCard().getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (event.getType() == EventType.COUNTERED) {
|
||||
if (creatures.contains(event.getTargetId())) {
|
||||
if (creatures.contains(event.getTargetId())) {
|
||||
creatures.remove(event.getSourceId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (event.getType() == EventType.ZONE_CHANGE) {
|
||||
if (creatures.contains(event.getSourceId())) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
|
@ -133,22 +136,22 @@ class HallOfTheBanditLordWatcher extends Watcher {
|
|||
if (zEvent.getToZone() == Zone.STACK) {
|
||||
creatures.remove(event.getSourceId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD) {
|
||||
if (creatures.contains(event.getSourceId())) {
|
||||
if (creatures.contains(event.getSourceId())) {
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(event.getSourceId()));
|
||||
game.addEffect(effect, source);
|
||||
creatures.remove(event.getSourceId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
creatures.clear();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class MyojinOfInfiniteRage extends CardImpl {
|
|||
private static final FilterLandPermanent filter = new FilterLandPermanent("lands");
|
||||
|
||||
public MyojinOfInfiniteRage(UUID ownerId) {
|
||||
super(ownerId, 181, "Myojin Of Infinite Rage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{7}{R}{R}{R}");
|
||||
super(ownerId, 181, "Myojin of Infinite Rage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{7}{R}{R}{R}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Spirit");
|
||||
|
|
|
@ -25,14 +25,9 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -44,7 +39,10 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterNonlandCard;
|
||||
|
@ -61,7 +59,7 @@ import mage.target.common.TargetCardInLibrary;
|
|||
*/
|
||||
public class NightDealings extends CardImpl {
|
||||
|
||||
public NightDealings (UUID ownerId) {
|
||||
public NightDealings(UUID ownerId) {
|
||||
super(ownerId, 132, "Night Dealings", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
||||
|
@ -74,7 +72,7 @@ public class NightDealings extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public NightDealings (final NightDealings card) {
|
||||
public NightDealings(final NightDealings card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -83,7 +81,6 @@ public class NightDealings extends CardImpl {
|
|||
return new NightDealings(this);
|
||||
}
|
||||
|
||||
|
||||
private class NightDealingsTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public NightDealingsTriggeredAbility() {
|
||||
|
@ -106,17 +103,17 @@ public class NightDealings extends CardImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
// to another player
|
||||
// to another player
|
||||
if (this.getControllerId() != event.getTargetId()) {
|
||||
// a source you control
|
||||
UUID sourceControllerId = game.getControllerId(event.getSourceId());
|
||||
if (sourceControllerId != null && sourceControllerId == this.getControllerId()) {
|
||||
if (sourceControllerId != null && sourceControllerId.equals(this.getControllerId())) {
|
||||
// save amount of damage to effect
|
||||
this.getEffects().get(0).setValue("damageAmount", event.getAmount());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -181,9 +178,9 @@ public class NightDealings extends CardImpl {
|
|||
int cmc = 0;
|
||||
for (Cost cost : source.getCosts()) {
|
||||
if (cost instanceof RemoveVariableCountersSourceCost) {
|
||||
cmc = ((RemoveVariableCountersSourceCost)cost).getAmount();
|
||||
cmc = ((RemoveVariableCountersSourceCost) cost).getAmount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FilterNonlandCard filter = new FilterNonlandCard("nonland card with converted mana cost X = " + cmc);
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc));
|
||||
|
@ -192,8 +189,8 @@ public class NightDealings extends CardImpl {
|
|||
if (player.searchLibrary(target, game)) {
|
||||
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
|
||||
String name = "Reveal";
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
|
|
|
@ -28,27 +28,19 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.DamagedByWatcher;
|
||||
|
||||
|
@ -74,7 +66,7 @@ public class NineRingedBo extends CardImpl {
|
|||
Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn);
|
||||
effect.setText("If that creature would die this turn, exile it instead");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability, new DamagedByWatcher());
|
||||
}
|
||||
|
||||
public NineRingedBo(final NineRingedBo card) {
|
||||
|
|
|
@ -25,14 +25,10 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
|
@ -40,12 +36,15 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -61,7 +60,7 @@ public class OtherworldlyJourney extends CardImpl {
|
|||
super(ownerId, 37, "Otherworldly Journey", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
|
||||
// Exile target creature. At the beginning of the next end step, return that card to the battlefield under its owner's control with a +1/+1 counter on it.
|
||||
this.getSpellAbility().addEffect(new OtherworldlyJourneyEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
@ -82,7 +81,7 @@ class OtherworldlyJourneyEffect extends OneShotEffect {
|
|||
|
||||
private static final String effectText = "Exile target creature. At the beginning of the next end step, return that card to the battlefield under its owner's control with a +1/+1 counter on it";
|
||||
|
||||
OtherworldlyJourneyEffect ( ) {
|
||||
OtherworldlyJourneyEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = effectText;
|
||||
}
|
||||
|
@ -102,12 +101,12 @@ class OtherworldlyJourneyEffect extends OneShotEffect {
|
|||
Card card = game.getCard(permanent.getId());
|
||||
if (card != null) {
|
||||
//create delayed triggered ability
|
||||
DelayedTriggeredAbility delayedAbility =
|
||||
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new OtherworldlyJourneyReturnFromExileEffect(new MageObjectReference(card, game)));
|
||||
DelayedTriggeredAbility delayedAbility
|
||||
= new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new OtherworldlyJourneyReturnFromExileEffect(new MageObjectReference(card, game)));
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
delayedAbility.setControllerId(source.getControllerId());
|
||||
delayedAbility.setSourceObject(source.getSourceObject(game), game);
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -126,6 +125,7 @@ class OtherworldlyJourneyEffect extends OneShotEffect {
|
|||
class OtherworldlyJourneyReturnFromExileEffect extends OneShotEffect {
|
||||
|
||||
MageObjectReference objectToReturn;
|
||||
|
||||
public OtherworldlyJourneyReturnFromExileEffect(MageObjectReference objectToReturn) {
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.objectToReturn = objectToReturn;
|
||||
|
@ -148,19 +148,18 @@ class OtherworldlyJourneyReturnFromExileEffect extends OneShotEffect {
|
|||
if (card != null && objectToReturn.refersTo(card, game)) {
|
||||
Player owner = game.getPlayer(card.getOwnerId());
|
||||
if (owner != null) {
|
||||
game.addEffect(new OtherworldlyJourneyEntersBattlefieldEffect(objectToReturn), source);
|
||||
owner.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
|
||||
game.addEffect(new OtherworldlyJourneyEntersBattlefieldEffect(objectToReturn), source);
|
||||
owner.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class OtherworldlyJourneyEntersBattlefieldEffect extends ReplacementEffectImpl {
|
||||
|
||||
|
||||
MageObjectReference objectToReturn;
|
||||
|
||||
|
||||
public OtherworldlyJourneyEntersBattlefieldEffect(MageObjectReference objectToReturn) {
|
||||
super(Duration.Custom, Outcome.BoostCreature);
|
||||
this.objectToReturn = objectToReturn;
|
||||
|
@ -187,7 +186,7 @@ class OtherworldlyJourneyEntersBattlefieldEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
if (permanent != null) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(), game);
|
||||
discard(); // use only once
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.SpliceOntoArcaneAbility;
|
||||
|
@ -58,7 +59,6 @@ public class Reweave extends CardImpl {
|
|||
this.expansionSetCode = "CHK";
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
|
||||
// Target permanent's controller sacrifices it. If he or she does, that player reveals cards from the top of his or her library until he or she reveals a permanent card that shares a card type with the sacrificed permanent, puts that card onto the battlefield, then shuffles his or her library.
|
||||
this.getSpellAbility().addEffect(new ReweaveEffect());
|
||||
Target target = new TargetPermanent();
|
||||
|
@ -97,9 +97,10 @@ class ReweaveEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget());
|
||||
if (permanent != null) {
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (permanent != null && sourceObject != null) {
|
||||
if (permanent.sacrifice(source.getSourceId(), game)) {
|
||||
Player permanentController = game.getPlayer(permanent.getControllerId());
|
||||
if (permanentController != null) {
|
||||
|
@ -122,11 +123,11 @@ class ReweaveEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
} while (!cardFound && library.size() > 0);
|
||||
permanentController.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
permanentController.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
|
||||
if (cards.size() > 0) {
|
||||
permanentController.revealCards("Reweave", cards, game);
|
||||
permanentController.revealCards(sourceObject.getIdName(), cards, game);
|
||||
if (cardFound && card != null) {
|
||||
cards.remove(card);
|
||||
}
|
||||
|
@ -137,7 +138,7 @@ class ReweaveEffect extends OneShotEffect {
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class RyuseiTheFallingStar extends CardImpl {
|
|||
}
|
||||
|
||||
public RyuseiTheFallingStar(UUID ownerID) {
|
||||
super(ownerID, 185, "Ryusei, The Falling Star", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}");
|
||||
super(ownerID, 185, "Ryusei, the Falling Star", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Dragon");
|
||||
|
|
|
@ -28,16 +28,20 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.*;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -61,7 +65,7 @@ public class ShimatsuTheBloodcloaked extends CardImpl {
|
|||
this.toughness = new MageInt(0);
|
||||
|
||||
// As Shimatsu the Bloodcloaked enters the battlefield, sacrifice any number of permanents. Shimatsu enters the battlefield with that many +1/+1 counters on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ShimatsuTheBloodcloakedEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new ShimatsuTheBloodcloakedEffect()));
|
||||
}
|
||||
|
||||
public ShimatsuTheBloodcloaked(final ShimatsuTheBloodcloaked card) {
|
||||
|
@ -75,16 +79,16 @@ public class ShimatsuTheBloodcloaked extends CardImpl {
|
|||
}
|
||||
|
||||
class ShimatsuTheBloodcloakedEffect extends ReplacementEffectImpl {
|
||||
|
||||
|
||||
public ShimatsuTheBloodcloakedEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.BoostCreature);
|
||||
super(Duration.EndOfGame, Outcome.BoostCreature);
|
||||
this.staticText = "As {this} enters the battlefield, sacrifice any number of permanents. {this} enters the battlefield with that many +1/+1 counters on it";
|
||||
}
|
||||
|
||||
|
||||
public ShimatsuTheBloodcloakedEffect(final ShimatsuTheBloodcloakedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ShimatsuTheBloodcloakedEffect copy() {
|
||||
return new ShimatsuTheBloodcloakedEffect(this);
|
||||
|
@ -94,15 +98,15 @@ class ShimatsuTheBloodcloakedEffect extends ReplacementEffectImpl {
|
|||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getTargetId().equals(source.getSourceId());
|
||||
return event.getTargetId().equals(source.getSourceId());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent creature = game.getPermanent(event.getTargetId());
|
||||
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (creature != null && controller != null) {
|
||||
Target target = new TargetControlledPermanent(0, Integer.MAX_VALUE, new FilterControlledPermanent(), true);
|
||||
|
@ -112,8 +116,8 @@ class ShimatsuTheBloodcloakedEffect extends ReplacementEffectImpl {
|
|||
controller.chooseTarget(Outcome.Detriment, target, source, game);
|
||||
if (target.getTargets().size() > 0) {
|
||||
int sacrificedCreatures = target.getTargets().size();
|
||||
game.informPlayers(new StringBuilder(controller.getLogName()).append(" sacrifices ").append(sacrificedCreatures).append(" creatures for ").append(creature.getName()).toString());
|
||||
for (UUID targetId: target.getTargets()) {
|
||||
game.informPlayers(controller.getLogName() + " sacrifices " + sacrificedCreatures + " creatures for " + creature.getLogName());
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent targetCreature = game.getPermanent(targetId);
|
||||
if (targetCreature == null || !targetCreature.sacrifice(source.getSourceId(), game)) {
|
||||
return false;
|
||||
|
@ -124,5 +128,5 @@ class ShimatsuTheBloodcloakedEffect extends ReplacementEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.discard.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -56,6 +56,7 @@ public class SiftThroughSands extends CardImpl {
|
|||
|
||||
private static final String rule = "If you've cast a spell named Peer Through Depths and a spell named Reach Through Mists this turn, you may search your library for a card named The Unspeakable, put it onto the battlefield, then shuffle your library";
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("a card named The Unspeakable");
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("The Unspeakable"));
|
||||
}
|
||||
|
@ -65,13 +66,12 @@ public class SiftThroughSands extends CardImpl {
|
|||
this.expansionSetCode = "CHK";
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
|
||||
// Draw two cards, then discard a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
|
||||
Effect effect = new DiscardControllerEffect(1);
|
||||
effect.setText(", then discard a card");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
|
||||
|
||||
// If you've cast a spell named Peer Through Depths and a spell named Reach Through Mists this turn, you may search your library for a card named The Unspeakable, put it onto the battlefield, then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), false, true), new SiftThroughSandsCondition(), rule));
|
||||
this.getSpellAbility().addWatcher(new SiftThroughSandsWatcher());
|
||||
|
@ -125,7 +125,7 @@ class SiftThroughSandsWatcher extends Watcher {
|
|||
return;
|
||||
}
|
||||
if (event.getType() == EventType.SPELL_CAST
|
||||
&& controllerId == event.getPlayerId()) {
|
||||
&& controllerId.equals(event.getPlayerId())) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell.getCard().getName().equals("Peer Through Depths")) {
|
||||
castPeerThroughDepths = true;
|
||||
|
|
|
@ -106,7 +106,7 @@ class ThroughTheBreachEffect extends OneShotEffect {
|
|||
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
if (controller.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId())) {
|
||||
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null) {
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
|
||||
|
|
|
@ -43,7 +43,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class UnearthlyBlizzard extends CardImpl {
|
||||
|
||||
public UnearthlyBlizzard(UUID ownerId) {
|
||||
super(ownerId, 196, "Unearthly Blizzard", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}");
|
||||
super(ownerId, 196, "Unearthly Blizzard", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{R}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
|
|
|
@ -31,8 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.PreventionEffectData;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.abilities.effects.RedirectionEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
@ -42,8 +41,7 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -53,6 +51,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
public class VassalsDuty extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("legendary creature you control");
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
}
|
||||
|
@ -61,10 +60,9 @@ public class VassalsDuty extends CardImpl {
|
|||
super(ownerId, 48, "Vassal's Duty", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
||||
|
||||
// {1}: The next 1 damage that would be dealt to target legendary creature you control this turn is dealt to you instead.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new VassalsDutyPreventDamageTargetEffect(Duration.EndOfTurn, 1), new GenericManaCost(1));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1,1,filter, false));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -78,10 +76,10 @@ public class VassalsDuty extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class VassalsDutyPreventDamageTargetEffect extends PreventionEffectImpl {
|
||||
class VassalsDutyPreventDamageTargetEffect extends RedirectionEffect {
|
||||
|
||||
public VassalsDutyPreventDamageTargetEffect(Duration duration, int amount) {
|
||||
super(duration, amount, false);
|
||||
super(duration, amount, true);
|
||||
staticText = "The next " + amount + " damage that would be dealt to target legendary creature you control this turn is dealt to you instead";
|
||||
}
|
||||
|
||||
|
@ -94,29 +92,13 @@ class VassalsDutyPreventDamageTargetEffect extends PreventionEffectImpl {
|
|||
return new VassalsDutyPreventDamageTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
PreventionEffectData preventionResult = preventDamageAction(event, source, game);
|
||||
// deal damage now
|
||||
if (preventionResult.getPreventedDamage() > 0) {
|
||||
UUID redirectTo = source.getControllerId();
|
||||
Player player = game.getPlayer(redirectTo);
|
||||
if (player != null) {
|
||||
game.informPlayers("Dealing " + preventionResult.getPreventedDamage() + " to " + player.getLogName() + " instead");
|
||||
// keep the original source id as it is redirecting
|
||||
player.damage(preventionResult.getPreventedDamage(), event.getSourceId(), game, false, true);
|
||||
}
|
||||
}
|
||||
// damage amount is reduced or set to 0 so complete replacement of damage event is never neccessary
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (!this.used && super.applies(event, source, game)) {
|
||||
if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) {
|
||||
return game.getPermanent(event.getTargetId()) != null;
|
||||
}
|
||||
if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) {
|
||||
TargetPlayer target = new TargetPlayer();
|
||||
target.add(source.getControllerId(), game);
|
||||
redirectTarget = target;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -77,45 +77,3 @@ public class YamabushisStorm extends CardImpl {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class YamabushisStormEffect extends ReplacementEffectImpl {
|
||||
|
||||
public YamabushisStormEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Exile);
|
||||
staticText = "If a creature dealt damage this way would die this turn, exile it instead";
|
||||
}
|
||||
|
||||
public YamabushisStormEffect(final YamabushisStormEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YamabushisStormEffect copy() {
|
||||
return new YamabushisStormEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||
if (controller != null && permanent != null) {
|
||||
return controller.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ZONE_CHANGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (((ZoneChangeEvent) event).isDiesEvent()) {
|
||||
DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId());
|
||||
return watcher != null && watcher.wasDamaged(event.getTargetId(), game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.classicsixthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CelestialDawn extends mage.sets.timeshifted.CelestialDawn {
|
||||
|
||||
public CelestialDawn(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 7;
|
||||
this.expansionSetCode = "6ED";
|
||||
this.rarity = Rarity.RARE;
|
||||
}
|
||||
|
||||
public CelestialDawn(final CelestialDawn card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CelestialDawn copy() {
|
||||
return new CelestialDawn(this);
|
||||
}
|
||||
}
|
|
@ -56,8 +56,9 @@ import mage.target.common.TargetCardInLibrary;
|
|||
* @author emerald000
|
||||
*/
|
||||
public class ArcumDagsson extends CardImpl {
|
||||
|
||||
|
||||
private static final FilterPermanent filter = new FilterArtifactPermanent("artifact creature");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
@ -88,26 +89,27 @@ public class ArcumDagsson extends CardImpl {
|
|||
}
|
||||
|
||||
class ArcumDagssonEffect extends OneShotEffect {
|
||||
|
||||
|
||||
private static final FilterCard filter = new FilterArtifactCard("noncreature artifact card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
|
||||
ArcumDagssonEffect() {
|
||||
super(Outcome.Removal);
|
||||
this.staticText = "Target artifact creature's controller sacrifices it. That player may search his or her library for a noncreature artifact card, put it onto the battlefield, then shuffle his or her library";
|
||||
}
|
||||
|
||||
|
||||
ArcumDagssonEffect(final ArcumDagssonEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ArcumDagssonEffect copy() {
|
||||
return new ArcumDagssonEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent artifactCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||
|
@ -120,7 +122,7 @@ class ArcumDagssonEffect extends OneShotEffect {
|
|||
if (player.searchLibrary(target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
|
|
|
@ -32,7 +32,6 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.costs.common.DiscardTargetCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -41,7 +40,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -65,14 +63,17 @@ public class BlizzardSpecter extends CardImpl {
|
|||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever Blizzard Specter deals combat damage to a player, choose one - That player returns a permanent he or she controls to its owner's hand; or that player discards a card.
|
||||
Ability ability2 = new DealsCombatDamageToAPlayerTriggeredAbility(new ReturnToHandEffect(), false);
|
||||
|
||||
Mode mode2 = new Mode();
|
||||
mode2.getEffects().add(new DiscardTargetEffect(1, false));
|
||||
ability2.addMode(mode2);
|
||||
|
||||
this.addAbility(ability2);
|
||||
|
||||
// Whenever Blizzard Specter deals combat damage to a player, choose one
|
||||
// - That player returns a permanent he or she controls to its owner's hand;
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new ReturnToHandEffect(), false, true);
|
||||
|
||||
// or that player discards a card.
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new DiscardTargetEffect(1, false));
|
||||
ability.addMode(mode);
|
||||
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public BlizzardSpecter(final BlizzardSpecter card) {
|
||||
|
@ -103,26 +104,19 @@ class ReturnToHandEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
boolean result = false;
|
||||
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if (player == null) {
|
||||
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if (targetPlayer == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Target target = new TargetControlledPermanent(1, 1, new FilterControlledPermanent(), true);
|
||||
if (target.canChoose(player.getId(), game)) {
|
||||
while (player.canRespond() && !target.isChosen() && target.canChoose(player.getId(), game)) {
|
||||
player.chooseTarget(Outcome.ReturnToHand, target, source, game);
|
||||
if (target.canChoose(targetPlayer.getId(), game)) {
|
||||
targetPlayer.chooseTarget(Outcome.ReturnToHand, target, source, game);
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
targetPlayer.moveCards(permanent, null, Zone.HAND, source, game);
|
||||
}
|
||||
|
||||
for (UUID targetId: target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
93
Mage.Sets/src/mage/sets/coldsnap/BraidOfFire.java
Normal file
93
Mage.Sets/src/mage/sets/coldsnap/BraidOfFire.java
Normal file
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.coldsnap;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author AlumiuN
|
||||
*/
|
||||
public class BraidOfFire extends CardImpl {
|
||||
|
||||
public BraidOfFire(UUID ownerId) {
|
||||
super(ownerId, 78, "Braid of Fire", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
|
||||
this.expansionSetCode = "CSP";
|
||||
|
||||
// Cumulative upkeep-Add {R} to your mana pool.
|
||||
this.addAbility(new CumulativeUpkeepAbility(new BraidOfFireCost()));
|
||||
}
|
||||
|
||||
public BraidOfFire(final BraidOfFire card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BraidOfFire copy() {
|
||||
return new BraidOfFire(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BraidOfFireCost extends CostImpl {
|
||||
|
||||
public BraidOfFireCost() {
|
||||
this.text = "Add {R} to your mana pool";
|
||||
}
|
||||
|
||||
public BraidOfFireCost(BraidOfFireCost cost) {
|
||||
super(cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||
Player player = game.getPlayer(controllerId);
|
||||
player.getManaPool().addMana(Mana.RedMana, game, ability);
|
||||
paid = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||
return game.getPlayer(controllerId) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BraidOfFireCost copy() {
|
||||
return new BraidOfFireCost(this);
|
||||
}
|
||||
|
||||
}
|
79
Mage.Sets/src/mage/sets/coldsnap/DiscipleOfTeveshSzat.java
Normal file
79
Mage.Sets/src/mage/sets/coldsnap/DiscipleOfTeveshSzat.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.coldsnap;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class DiscipleOfTeveshSzat extends CardImpl {
|
||||
|
||||
public DiscipleOfTeveshSzat(UUID ownerId) {
|
||||
super(ownerId, 55, "Disciple of Tevesh Szat", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
|
||||
this.expansionSetCode = "CSP";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Target creature gets -1/-1 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
// {4}{B}{B}, {tap}, Sacrifice Disciple of Tevesh Szat: Target creature gets -6/-6 until end of turn.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-6, -6, Duration.EndOfTurn), new ManaCostsImpl("{4}{B}{B}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public DiscipleOfTeveshSzat(final DiscipleOfTeveshSzat card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscipleOfTeveshSzat copy() {
|
||||
return new DiscipleOfTeveshSzat(this);
|
||||
}
|
||||
}
|
140
Mage.Sets/src/mage/sets/coldsnap/HibernationsEnd.java
Normal file
140
Mage.Sets/src/mage/sets/coldsnap/HibernationsEnd.java
Normal file
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.coldsnap;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class HibernationsEnd extends CardImpl {
|
||||
|
||||
public HibernationsEnd(UUID ownerId) {
|
||||
super(ownerId, 110, "Hibernation's End", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}");
|
||||
this.expansionSetCode = "CSP";
|
||||
|
||||
// Cumulative upkeep {1}
|
||||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}")));
|
||||
// Whenever you pay Hibernation's End's cumulative upkeep, you may search your library for a creature card with converted mana cost equal to the number of age counters on Hibernation's End and put it onto the battlefield. If you do, shuffle your library.
|
||||
this.addAbility(new HibernationsEndAbility());
|
||||
}
|
||||
|
||||
public HibernationsEnd(final HibernationsEnd card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HibernationsEnd copy() {
|
||||
return new HibernationsEnd(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HibernationsEndAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public HibernationsEndAbility() {
|
||||
super(Zone.BATTLEFIELD, new HibernationsEndEffect(), true);
|
||||
}
|
||||
|
||||
public HibernationsEndAbility(final HibernationsEndAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HibernationsEndAbility copy() {
|
||||
return new HibernationsEndAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.PAID_CUMULATIVE_UPKEEP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getSourceId() != null && event.getSourceId().equals(this.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you pay {this}'s cumulative upkeep, " + super.getRule();
|
||||
}
|
||||
}
|
||||
|
||||
class HibernationsEndEffect extends OneShotEffect {
|
||||
|
||||
public HibernationsEndEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "search your library for a creature card with converted mana cost equal to the number of age counters on {this} and put it onto the battlefield. If you do, shuffle your library.";
|
||||
}
|
||||
|
||||
public HibernationsEndEffect(final HibernationsEndEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HibernationsEndEffect copy() {
|
||||
return new HibernationsEndEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (sourcePermanent != null && player != null) {
|
||||
int newConvertedCost = sourcePermanent.getCounters().getCount("age");
|
||||
FilterCard filter = new FilterCard("creature card with converted mana cost " + newConvertedCost);
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, newConvertedCost));
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
return new SearchLibraryPutInPlayEffect(target).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -29,6 +29,7 @@ package mage.sets.coldsnap;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardTargetCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
|
@ -59,7 +60,6 @@ public class LightningStorm extends CardImpl {
|
|||
super(ownerId, 89, "Lightning Storm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{R}{R}");
|
||||
this.expansionSetCode = "CSP";
|
||||
|
||||
|
||||
// Lightning Storm deals X damage to target creature or player, where X is 3 plus the number of charge counters on it.
|
||||
Effect effect = new DamageTargetEffect(new LightningStormCountCondition(CounterType.CHARGE));
|
||||
effect.setText("{this} deals X damage to target creature or player, where X is 3 plus the number of charge counters on it");
|
||||
|
@ -67,7 +67,7 @@ public class LightningStorm extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
|
||||
// Discard a land card: Put two charge counters on Lightning Storm. You may choose a new target for it. Any player may activate this ability but only if Lightning Storm is on the stack.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.STACK,
|
||||
new LightningStormAddCounterEffect() ,
|
||||
new LightningStormAddCounterEffect(),
|
||||
new DiscardTargetCost(new TargetCardInHand(new FilterLandCard())));
|
||||
ability.setMayActivate(TargetController.ANY);
|
||||
ability.addEffect(new InfoEffect("Any player may activate this ability but only if {this} is on the stack"));
|
||||
|
@ -85,6 +85,7 @@ public class LightningStorm extends CardImpl {
|
|||
}
|
||||
|
||||
class LightningStormCountCondition implements DynamicValue {
|
||||
|
||||
private final CounterType counter;
|
||||
|
||||
public LightningStormCountCondition(CounterType counter) {
|
||||
|
@ -141,7 +142,7 @@ class LightningStormAddCounterEffect extends OneShotEffect {
|
|||
Spell spell = game.getStack().getSpell(source.getSourceId());
|
||||
if (spell != null) {
|
||||
spell.addCounters(CounterType.CHARGE.createInstance(2), game);
|
||||
return spell.chooseNewTargets(game, source.getControllerId(), false, false, null);
|
||||
return spell.chooseNewTargets(game, ((ActivatedAbilityImpl) source).getActivatorId(), false, false, null);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class AvatarOfSlaughter extends CardImpl {
|
|||
this.toughness = new MageInt(8);
|
||||
|
||||
// All creatures have double strike and attack each turn if able.
|
||||
Effect effect = new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield);
|
||||
Effect effect = new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("creatures"));
|
||||
effect.setText("All creatures have double strike");
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
effect = new AttacksIfAbleAllEffect(new FilterCreaturePermanent("creatures"));
|
||||
|
|
|
@ -46,9 +46,9 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
|
@ -102,33 +102,6 @@ class ChorusOfTheConclaveReplacementEffect extends ReplacementEffectImpl {
|
|||
return new ChorusOfTheConclaveReplacementEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
int xCost = 0;
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (you != null) {
|
||||
if (you.chooseUse(Outcome.Benefit, "Do you wish to pay the additonal cost to add +1/+1 counters to the creature you cast?", source, game)) {
|
||||
xCost += playerPaysXGenericMana(you, source, game);
|
||||
// save the x value to be available for ETB replacement effect
|
||||
Object object = game.getState().getValue("spellX" + source.getSourceId());
|
||||
Map<UUID, Integer> spellX;
|
||||
if (object != null && object instanceof Map) {
|
||||
spellX = (Map<UUID, Integer>) object;
|
||||
} else {
|
||||
spellX = new HashMap<>();
|
||||
}
|
||||
spellX.put(event.getSourceId(), xCost);
|
||||
game.getState().setValue("spellX" + source.getSourceId(), spellX);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CAST_SPELL;
|
||||
|
@ -136,7 +109,7 @@ class ChorusOfTheConclaveReplacementEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getPlayerId() == source.getControllerId()) {
|
||||
if (event.getPlayerId().equals(source.getControllerId())) {
|
||||
MageObject spellObject = game.getObject(event.getSourceId());
|
||||
if (spellObject != null) {
|
||||
return spellObject.getCardType().contains(CardType.CREATURE);
|
||||
|
@ -145,6 +118,28 @@ class ChorusOfTheConclaveReplacementEffect extends ReplacementEffectImpl {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
int xCost = 0;
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (controller.chooseUse(Outcome.Benefit, "Do you wish to pay the additonal cost to add +1/+1 counters to the creature you cast?", source, game)) {
|
||||
xCost += playerPaysXGenericMana(controller, source, game);
|
||||
// save the x value to be available for ETB replacement effect
|
||||
Object object = game.getState().getValue("spellX" + source.getSourceId());
|
||||
Map<String, Integer> spellX;
|
||||
if (object != null && object instanceof Map) {
|
||||
spellX = (Map<String, Integer>) object;
|
||||
} else {
|
||||
spellX = new HashMap<>();
|
||||
}
|
||||
spellX.put(event.getSourceId().toString() + game.getState().getZoneChangeCounter(event.getSourceId()), xCost);
|
||||
game.getState().setValue("spellX" + source.getSourceId(), spellX);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected static int playerPaysXGenericMana(Player player, Ability source, Game game) {
|
||||
int xValue = 0;
|
||||
boolean payed = false;
|
||||
|
@ -157,7 +152,7 @@ class ChorusOfTheConclaveReplacementEffect extends ReplacementEffectImpl {
|
|||
payed = true;
|
||||
}
|
||||
}
|
||||
game.informPlayers(new StringBuilder(player.getLogName()).append(" pays {").append(xValue).append("}.").toString());
|
||||
game.informPlayers(player.getLogName() + " pays {" + xValue + "}");
|
||||
return xValue;
|
||||
}
|
||||
|
||||
|
@ -191,22 +186,25 @@ class ChorusOfTheConclaveReplacementEffect2 extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Map<UUID, Integer> spellX = (Map<UUID, Integer>) game.getState().getValue("spellX" + source.getSourceId());
|
||||
return spellX != null && spellX.containsKey(event.getSourceId());
|
||||
Map<String, Integer> spellX = (Map<String, Integer>) game.getState().getValue("spellX" + source.getSourceId());
|
||||
return spellX != null
|
||||
&& event.getSourceId() != null
|
||||
&& spellX.containsKey(event.getSourceId().toString() + (game.getState().getZoneChangeCounter(event.getSourceId()) - 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent creature = game.getPermanent(event.getSourceId());
|
||||
Map<UUID, Integer> spellX = (Map<UUID, Integer>) game.getState().getValue("spellX" + source.getSourceId());
|
||||
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
Map<String, Integer> spellX = (Map<String, Integer>) game.getState().getValue("spellX" + source.getSourceId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (sourceObject != null && creature != null && spellX != null) {
|
||||
int xValue = spellX.get(event.getSourceId());
|
||||
String key = event.getSourceId().toString() + (game.getState().getZoneChangeCounter(event.getSourceId()) - 1);
|
||||
int xValue = spellX.get(key);
|
||||
if (xValue > 0) {
|
||||
creature.addCounters(CounterType.P1P1.createInstance(xValue), game);
|
||||
game.informPlayers(sourceObject.getName() +": Added " + xValue +" +1/+1 counter" + (xValue > 1 ? "s":"") + "on " + creature.getName());
|
||||
game.informPlayers(sourceObject.getLogName() + ": " + creature.getLogName() + " enters the battlefield with " + xValue + " +1/+1 counter" + (xValue > 1 ? "s" : "") + " on it");
|
||||
}
|
||||
spellX.remove(event.getSourceId());
|
||||
spellX.remove(key);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
|
@ -20,7 +20,7 @@
|
|||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
|
@ -148,20 +148,19 @@ class KaaliaOfTheVastEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null || !player.chooseUse(Outcome.PutCreatureInPlay, "Put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking?", source, game)) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null || !controller.chooseUse(Outcome.PutCreatureInPlay, "Put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking?", source, game)) {
|
||||
return false;
|
||||
}
|
||||
TargetCardInHand target = new TargetCardInHand(filter);
|
||||
if (target.canChoose(player.getId(), game) && target.choose(getOutcome(), player.getId(), source.getSourceId(), game)) {
|
||||
if (target.canChoose(controller.getId(), game) && target.choose(getOutcome(), controller.getId(), source.getSourceId(), game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
UUID cardId = target.getFirstTarget();
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null && game.getCombat() != null) {
|
||||
UUID defenderId = game.getCombat().getDefendingPlayerId(source.getSourceId(), game);
|
||||
if (defenderId != null) {
|
||||
player.getHand().remove(card);
|
||||
player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId(), true);
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
Permanent creature = game.getPermanent(cardId);
|
||||
if (creature != null) {
|
||||
game.getCombat().addAttackerToCombat(card.getId(), defenderId, game);
|
||||
|
|
|
@ -110,17 +110,17 @@ class KodamasReachEffect extends OneShotEffect {
|
|||
controller.choose(Outcome.Benefit, revealed, target2, game);
|
||||
Card card = revealed.get(target2.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), true);
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
revealed.remove(card);
|
||||
}
|
||||
card = revealed.getCards(game).iterator().next();
|
||||
if (card != null) {
|
||||
controller.moveCards(card, null, Zone.HAND, source, game);
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
}
|
||||
} else if (target.getTargets().size() == 1) {
|
||||
Card card = revealed.getCards(game).iterator().next();
|
||||
if (card != null) {
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), true);
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.common.AsEntersBattlefieldAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChoosePlayerEffect;
|
||||
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -47,9 +47,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
|
@ -67,7 +65,7 @@ public class SewerNemesis extends CardImpl {
|
|||
this.toughness = new MageInt(0);
|
||||
|
||||
// As Sewer Nemesis enters the battlefield, choose a player.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new SewerNemesisChoosePlayerEffect()));
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChoosePlayerEffect(Outcome.Detriment)));
|
||||
// Sewer Nemesis's power and toughness are each equal to the number of cards in the chosen player's graveyard.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInTargetOpponentsGraveyardCount(), Duration.WhileOnBattlefield)));
|
||||
// Whenever the chosen player casts a spell, that player puts the top card of his or her library into his or her graveyard.
|
||||
|
@ -85,42 +83,8 @@ public class SewerNemesis extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SewerNemesisChoosePlayerEffect extends OneShotEffect {
|
||||
|
||||
public SewerNemesisChoosePlayerEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "choose a player";
|
||||
}
|
||||
|
||||
public SewerNemesisChoosePlayerEffect(final SewerNemesisChoosePlayerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SewerNemesisChoosePlayerEffect copy() {
|
||||
return new SewerNemesisChoosePlayerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && permanent != null) {
|
||||
TargetPlayer target = new TargetPlayer(1,1,true);
|
||||
if (player.choose(this.outcome, target, source.getSourceId(), game)) {
|
||||
Player chosenPlayer = game.getPlayer(target.getFirstTarget());
|
||||
if (chosenPlayer != null) {
|
||||
game.informPlayers(permanent.getLogName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName());
|
||||
game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class CardsInTargetOpponentsGraveyardCount implements DynamicValue {
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
if (sourceAbility != null) {
|
||||
|
|
|
@ -110,7 +110,7 @@ class TarielReckonerOfSoulsEffect extends OneShotEffect {
|
|||
}
|
||||
if (!creatureCards.isEmpty()) {
|
||||
Card card = creatureCards.getRandom(game);
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId());
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -80,27 +80,27 @@ public class TheMimeoplasm extends CardImpl {
|
|||
}
|
||||
|
||||
class TheMimeoplasmEffect extends OneShotEffect {
|
||||
|
||||
|
||||
TheMimeoplasmEffect() {
|
||||
super(Outcome.Copy);
|
||||
}
|
||||
|
||||
|
||||
TheMimeoplasmEffect(final TheMimeoplasmEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TheMimeoplasmEffect copy() {
|
||||
return new TheMimeoplasmEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
Permanent permanent = game.getPermanentEntering(source.getSourceId());
|
||||
if (controller != null && permanent != null) {
|
||||
if (new CardsInAllGraveyardsCount(new FilterCreatureCard()).calculate(game, source, this) >= 2) {
|
||||
if (controller.chooseUse(Outcome.Benefit, "Do you want to exile two creature cards from graveyards?", source, game)) {
|
||||
if (controller.chooseUse(Outcome.Benefit, "Do you want to exile two creature cards from graveyards?", source, game)) {
|
||||
TargetCardInGraveyard targetCopy = new TargetCardInGraveyard(new FilterCreatureCard("creature card to become a copy of"));
|
||||
TargetCardInGraveyard targetCounters = new TargetCardInGraveyard(new FilterCreatureCard("creature card to determine amount of additional +1/+1 counters"));
|
||||
if (controller.choose(Outcome.Copy, targetCopy, source.getSourceId(), game)) {
|
||||
|
@ -122,7 +122,7 @@ class TheMimeoplasmEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class LeafdrakeRoost extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Enchanted land has "{G}{U}, {tap}: Put a 2/2 green and blue Drake creature token with flying onto the battlefield."
|
||||
Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LeafdrakeRoostDragonToken()), new ManaCostsImpl("{G}{U}"));
|
||||
Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LeafdrakeRoostDrakeToken()), new ManaCostsImpl("{G}{U}"));
|
||||
abilityToGain.addCost(new TapSourceCost());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(abilityToGain, AttachmentType.AURA, Duration.WhileOnBattlefield,
|
||||
"Enchanted land has \"{G}{U}, {t}: Put a 2/2 green and blue Drake creature token with flying onto the battlefield.\"")));
|
||||
|
@ -87,14 +87,14 @@ public class LeafdrakeRoost extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class LeafdrakeRoostDragonToken extends Token {
|
||||
class LeafdrakeRoostDrakeToken extends Token {
|
||||
|
||||
public LeafdrakeRoostDragonToken() {
|
||||
super("Dragon", "2/2 green and blue Drake creature token with flying");
|
||||
public LeafdrakeRoostDrakeToken() {
|
||||
super("Drake", "2/2 green and blue Drake creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
color.setBlue(true);
|
||||
subtype.add("Dragon");
|
||||
subtype.add("Drake");
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
|
|
@ -66,8 +66,9 @@ public class NayaSoulbeast extends CardImpl {
|
|||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// When you cast Naya Soulbeast, each player reveals the top card of his or her library. Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.
|
||||
// When you cast Naya Soulbeast, each player reveals the top card of his or her library.
|
||||
Ability ability = new CastSourceTriggeredAbility(new NayaSoulbeastCastEffect(), false);
|
||||
// Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.
|
||||
ability.addEffect(new NayaSoulbeastReplacementEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ import mage.constants.WatcherScope;
|
|||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -74,7 +75,7 @@ public class OpalPalace extends CardImpl {
|
|||
ability = new SimpleStaticAbility(Zone.ALL, new OpalPalaceEntersBattlefieldEffect());
|
||||
ability.setRuleVisible(false);
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public OpalPalace(final OpalPalace card) {
|
||||
|
@ -91,10 +92,10 @@ class OpalPalaceWatcher extends Watcher {
|
|||
|
||||
public List<UUID> commanderId = new ArrayList<>();
|
||||
private final String originalId;
|
||||
|
||||
|
||||
public OpalPalaceWatcher(String originalId) {
|
||||
super("ManaPaidFromOpalPalaceWatcher", WatcherScope.CARD);
|
||||
this.originalId = originalId;
|
||||
this.originalId = originalId;
|
||||
}
|
||||
|
||||
public OpalPalaceWatcher(final OpalPalaceWatcher watcher) {
|
||||
|
@ -116,16 +117,16 @@ class OpalPalaceWatcher extends Watcher {
|
|||
if (spell != null) {
|
||||
Card card = spell.getCard();
|
||||
if (card != null) {
|
||||
for (UUID playerId :game.getPlayerList()) {
|
||||
for (UUID playerId : game.getPlayerList()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
if (player.getCommanderId() != null && player.getCommanderId().equals(card.getId())) {
|
||||
commanderId.add(card.getId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,19 +154,19 @@ class OpalPalaceEntersBattlefieldEffect extends ReplacementEffectImpl {
|
|||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
OpalPalaceWatcher watcher = (OpalPalaceWatcher) game.getState().getWatchers().get("ManaPaidFromOpalPalaceWatcher", source.getSourceId());
|
||||
return watcher != null &&
|
||||
watcher.commanderId.contains(event.getTargetId());
|
||||
return watcher != null
|
||||
&& watcher.commanderId.contains(event.getTargetId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
if (permanent != null) {
|
||||
Integer castCount = (Integer)game.getState().getValue(permanent.getId() + "_castCount");
|
||||
Integer castCount = (Integer) game.getState().getValue(permanent.getId() + "_castCount");
|
||||
if (castCount != null && castCount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(castCount), game);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue